fitSpline | R Documentation |
Fit a temporal spline with a given set of covariates; i.e., fit a generalized additive model (GAM).
fitSpline( covarString, df, eff.ind.inside, tmp.df, dist, max.df, eff.inside.dates )
covarString |
A character string of length one housing all covariates to
be considered, with all covariates collapsed via |
df |
The data frame for a specific |
eff.ind.inside |
A vector of length equal to the number of rows in data
frame |
tmp.df |
The reduced data frame originating from |
dist |
The distributional family used in calls to function |
max.df |
The highest number of degrees of freedom to be used in the
fitting of temporal-dimension splines. Set by |
eff.inside.dates |
A temporal |
Note that returned object bspl
is not the same as
cur.bspl
. In order to stop, the loop that evaluates temporal
splines must first evaluate the next model. In the case that the next
model fails to be better than the current model, the current model is the
winner. Object cur.bspl
is the basis matrix associated with the
winning current model, while bspl
is the basis maxtri associated
with that (non-winning) next model.
The overdispersion parameter is fit in the traditional way, i.e., via Pearson residuals.
A list containing several different objects.
The glm
-type object resulting from the fit.
The AIC of fit
.
The matrix of ALL batchDate
s within eff.inside.dates
of the final evaluated model.
The matrix of REDUCED batchDates
s from bspl
tied to efficiency-trial dates.
The final number of degrees-of-freedom used in the final temporal spline fit.
The first date housed within the 1960-spline paradigm variable batchDate2
.
The last date housed within the 1960-spline paradigm variable batchDate2
.
The matrix of ALL batchDate
s within eff.inside.dates
of fit
model.
## Not run: fit <- fitSpline(covarString, df, eff.ind.inside, tmp.df, dist, max.df, eff.inside.dates) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.