Description Usage Arguments Examples
View source: R/RecursiveNested.R
This function is used in the fastSWEcalculation.R function to quickly calculate SwE for a nested variable.
1 2 3 4 5 6 7 8 9 10 11 12 13 | RecursiveNested(
iter,
nests,
nested,
datavec,
Sinit,
residarray,
Breadvec,
npred,
adjustment,
X,
Sb
)
|
iter |
The current iteration, when called it should be set to 1. |
nests |
The range of blocks within the nested design should be ordered in same order as the set of whole numbers (e.g. 1,2,3,4...) |
nested |
An integer vector denoting the blocks ordered by the input data |
datavec |
An integer denoting the number of vertices/voxels to be tested |
Sinit |
The initial covariance structure used by the sandwich estimator, default is a 1xPxdatavec numeric array set to zeros |
residarray |
The residuals from the initial fit of the model to the voxel/vertex-wide dataset, should be a numeric array of num_casesXnum_voxel/vertices |
Breadvec |
The "bread" of the sandwich estimator, calculated from the predictor variables P, should be a numeric array of Pxnum_cases |
npred |
The number of predictors, P. Should be an integer. |
S |
The covariance structure estimated from the sandwich estimator, updated upon each recursive estimation. |
1 | SwE <- RecursiveNested(iter=1,nests=1:Nschool,nested=Ischool,datavec=Nelm,Sinit=S0,residarray=res,Breadvec=BreadX,npred=P,adjustment=adjustment,hat_adjust=hat_adjust,S)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.