Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ComputePostmeanHnew.approx

Compute the posterior mean and variance of h at a new predictor values


Description

Function to approximate the posterior mean and variance as a function of the estimated model parameters (e.g., tau, lambda, beta, and sigsq.eps)

Usage

ComputePostmeanHnew.approx(fit, y = NULL, Z = NULL, X = NULL,
  Znew = NULL, sel = NULL)

Arguments

fit

An object containing the results returned by a the kmbayes function

y

a vector of outcome data of length n.

Z

an n-by-M matrix of predictor variables to be included in the h function. Each row represents an observation and each column represents an predictor.

X

an n-by-K matrix of covariate data where each row represents an observation and each column represents a covariate. Should not contain an intercept column.

Znew

matrix of new predictor values at which to predict new h, where each row represents a new observation. If set to NULL then will default to using the observed exposures Z.

sel

logical expression indicating samples to keep; defaults to keeping the second half of all samples


bkmr

Bayesian Kernel Machine Regression

v0.2.0
GPL-2
Authors
Jennifer F. Bobb [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.