Description Usage Arguments Value Examples
Run glm with the selected variables (identified by nnt) as predictors.
1 | runLinearModel(dat, nnt, distr, func = "glm")
|
dat |
The dataset, as generated by readInputFile(). |
nnt |
The column numbers in the Z matrix of the non-null variables. |
distr |
The distribution to use when fitting the linear model (N=gaussian, P=poisson, or B=binomial). |
func |
The function to use when fitting the model: glm or lm (default=glm). |
Z |
A numeric matrix of putative variables (in the columns) |
mod |
The object returned from glm or lm. |
aic |
The AIC of the model. |
vif |
The variance inflation factors (if more than one variable is used in the model). |
1 2 3 4 5 6 7 | ## Not run:
fn <- system.file("extdata", "AR1SIM.RData", package = "SEMMS", mustWork = TRUE)
dataYXZ <- readInputFile(fn, ycol=1, Zcols=2:100)
fittedSEMMS <- fitSEMMS(dataYXZ, mincor=0.8, nn=15, minchange= 1,
distribution="N",verbose=T,rnd=F)
fittedGLM <- runLinearModel(dataYXZ,fittedSEMMS$gam.out$nn, "N")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.