predict.zlm | R Documentation |
Expected value (And standard errors) of predictions based on 'zlm' linear Bayesian model under Zellner's g prior
## S3 method for class 'zlm' predict(object, newdata = NULL, se.fit = FALSE, ...)
object |
a zlm linear model object - see |
newdata |
An optional data.frame, matrix or vector containing variables with which to predict. If omitted, then (the expected values of) the fitted values are returned. |
se.fit |
A switch indicating if the standard deviations for the predicted varaibles are required. |
... |
further arguments passed to or from other methods. |
A vector with (expected values of) fitted values.
If
se.fit
is TRUE
, then the output is a list with the following
elements:
fit |
a vector with the expected values of fitted values |
std.err |
a vector with the standard deviations of fitted values |
se.fit |
a vector with the standard errors without the residual scale
akin to |
residual.scale |
The part from the standard deviations that involves the identity matrix.
Note that |
bms
for creating zlm objects,
predict.lm
for a comparable function,
predict.bma
for predicting with bma objects
Check http://bms.zeugner.eu for additional help.
data(datafls) mm=zlm(datafls,g="EBL") predict(mm) #fitted values predict(mm, newdata=1:41) #prediction based on a 'new data point' #prediction based on a 'new data point', with 'standard errors' predict(mm, newdata=datafls[1,], se.fit=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.