ci.eta | R Documentation |
eta
) from a formula, coefficients, vcov and a
prediction frame.
Computes the linear predictor with its confidence limits from the model formula and the estimated parameters with the vcov.
ci.eta(form, cf, vcv, newdata,
name.check = TRUE,
alpha = 0.05, df = Inf, raw = FALSE)
form |
A model formula. A one-sided formula will suffice; left side will be ignored if two-sided. |
cf |
Coefficients from a model using |
vcv |
variance-covariance matrix from a model using |
newdata |
Prediction data frame with variables used in
|
name.check |
Logical. Check if the column names of the genereated
model matrix are identical to the names of the supplied |
alpha |
Significance level for calculation of c.i. |
df |
Integer. Number of degrees of freedom in the t-distribution used to compute the quantiles used to construct the confidence intervals. |
raw |
Logical. Should predictions and their vcov be returned instead of predictions and confidence limits? |
Does pretty much the same as ci.lin
, but requires only a
formula and coefficients with vcov and not a full model
object. Designed to avoid saving entire (homongously large) model
objects and still be able to compute predictions. But only the linear
predictor is returned, if there is a link in your model function it is
your own responsibility to back-transform. If the model formula
contains reference to vectors of spline knots or similar these must be
in the global environment.
There is no guarantee that this function works for models that do not
inherit from lm
. But there is a guarantee that it will not work
for gam
objects with s()
terms.
The linear predictor for the newdata
with a confidence interval
as a nrow(newdata)
by 3 matrix. If raw=TRUE
, a list the linear
predictor (eta
) and its variance-covariance matrix (var
).
Bendix Carstensen, http://bendixcarstensen.com
ci.lin
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.