Description Usage Arguments Details Value Author(s) References Examples
This function fits a spatial scale (SS) incremental forward stagewise regression model.
1 |
y |
A numeric response vector |
X |
A data frame of numeric variables |
X.3D |
A 3-D or stacked array of numeric variables, where each stack represents a particular level of covariates (i.e., individual- and area-level variables at more than one spatial scale). In cases where values are only present for a covariate at certain levels, that covariate is assigned missing values at all other levels. |
ss |
A vector of names to identify the different levels of covariates available as potential candidates for model input |
increment |
A positive step size |
tolerance |
A small, positive value used as a stopping criterion when none of the predictors are correlated with the residuals. The algorithm stops if the overall maximum correlation is less than a specified tolerance. |
col.plot |
A vector of colors (corresponding to each SS) used in the coefficient path plot |
verbose |
If TRUE, details are printed as the algorithm progresses |
plot |
If TRUE, a coefficient path plot is generated |
This function estimates coefficients using the SS forward stagewise regression approach. The function also provides summary details and plots a coefficient path plot.
A list with the following items:
beta.final |
Regression coefficient estimates from final model |
stack.ss |
Vector of indices to indicate the level at which each covariate enters the model |
Lauren Grant, David Wheeler
Grant LP, Gennings C, Wheeler, DC. (2015). Selecting spatial scale of covariates in regression models of environmental exposures. Cancer Informatics, 14(S2), 81-96. doi: 10.4137/CIN.S17302
1 2 3 4 5 |
Loading required package: tester
Loading required package: magic
Loading required package: abind
Loading required package: pracma
Attaching package: 'pracma'
The following object is masked from 'package:magic':
magic
[1] "Iteration = 16"
[1] "Max|cor| = 0.096"
[1] "Tolerance = 0.1"
x1 ss1_x2 ss2_x3
0.5 0.7 0.4
[1] "No. of vars in model = 3"
[1] "Total no. of vars possible = 3"
[1] "Increment = 0.1, Tolerance = 0.1"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.