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)
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
).
A model formula. A one-sided formula will suffice; left side will be ignored if two-sided.
Coefficients from a model using formula
.
variance-covariance matrix from a model using formula
.
Prediction data frame with variables used in
formula
. Can also be a list of 2 or 4 prediction frames, for
details see ci.lin
.
Logical. Check if the column names of the genereated
model matrix are identical to the names of the supplied coef
vector.
Significance level for calculation of c.i.
Integer. Number of degrees of freedom in the t-distribution used to compute the quantiles used to construct the confidence intervals.
Logical. Should predictions and their vcov be returned instead of predictions and confidence limits?
Bendix Carstensen, http://bendixcarstensen.com
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.
ci.lin