Description Usage Arguments Details Value See Also Examples

make predictions from a BVCfit object

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ```
## S3 method for class 'BVCfit'
predict(object, X.new, Z.new, E.new = NULL,
clin.new = NULL, Y.new = NULL, ...)
## S3 method for class 'VarLin'
predict(object, X.new, Z.new, E.new, clin.new = NULL,
Y.new = NULL, ...)
## S3 method for class 'VarOnly'
predict(object, X.new, Z.new, clin.new = NULL,
Y.new = NULL, ...)
## S3 method for class 'LinOnly'
predict(object, X.new, Z.new, E.new = NULL,
clin.new = NULL, Y.new = NULL, ...)
``` |

`object` |
BVCfit object. |

`X.new` |
a matrix of new values for X at which predictions are to be made. |

`Z.new` |
a vector of new values for Z at which predictions are to be made. |

`E.new` |
a vector of new values for E at which predictions are to be made. |

`clin.new` |
a vector or matrix of new values for clin at which predictions are to be made. |

`Y.new` |
a vector of the response of new observations. If provided, the prediction mean squared error (PMSE) will be computed based on Y.new. |

`...` |
other predict arguments |

X.new (clin.new) must have the same number of columns as X (clin) used for fitting the model. If E and clin are provided when fit the model, E.new and clin.new must not be NULL, and vice versa. The predictions are made based on the posterior estimates of coefficients in the BVCfit object. Note that the main effects of environmental exposures Z and E are not subject to selection.

an object of class "BVCfit.pred" is returned, which is a list with components:

`pmse` |
predictions mean squared error. pmse is NULL is Y.new=NULL. |

`y.pred` |
predicted values of the new observations. |

1 2 3 4 5 6 7 8 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.