ComputePostmeanHnew {bkmr}R Documentation

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

Description

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

Usage

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

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

selects which iterations of the MCMC sampler to use for inference; see details

method

method for obtaining posterior summaries at a vector of new points. Options are "approx" and "exact"; defaults to "approx", which is faster particularly for large datasets; see details

Details

For guided examples and additional information, go to https://jenfb.github.io/bkmr/overview.html


[Package bkmr version 0.2.0 Index]