stat.lm | R Documentation |
Performs correlations Generalized Linear Models tests and extracts estimates of predictor factors in each permuted model.
stat.lm(
ant,
formula,
oda,
progress = TRUE,
method = "qr",
model = TRUE,
x = FALSE,
y = FALSE,
qr = TRUE,
singular.ok = TRUE,
contrasts = NULL,
...
)
ant |
an output of ANT function |
formula |
an object of class "formula" (or one that can be coerced to that class): a symbolic description of the model to be fitted. The details of model specification are given under ‘Details’. |
oda |
the original data frame of associations when argument ant is obtained with perm.ds.grp or perm.ds.focal ANT functions. |
progress |
a boolean indicating the visualization of the permutation process. |
method |
the method to be used; for fitting, currently only method = "qr" is supported; method = "model.frame" returns the model frame (the same as with model = TRUE, see below). |
model |
logicals. If TRUE the corresponding components of the fit (the model frame, the model matrix, the response, the QR decomposition) are returned. |
x |
logicals. If TRUE the corresponding components of the fit (the model frame, the model matrix, the response, the QR decomposition) are returned. |
y |
logicals. If TRUE the corresponding components of the fit (the model frame, the model matrix, the response, the QR decomposition) are returned. |
qr |
logicals. If TRUE the corresponding components of the fit (the model frame, the model matrix, the response, the QR decomposition) are returned. |
singular.ok |
logical. If FALSE (the default in S but not in R) a singular fit is an error. |
contrasts |
an optional list. See the contrasts.arg of model.matrix.default. |
... |
Extra arguments for |
This function is the first step for performing t-tests in permuted data. For more details on t-tests, see R documentation.
Returns a list of 3 elements :
An object of class "lm" or for multiple responses of class c("mlm", "lm").
A data frame if the estimates of the permuted models.
A vector of integers indicating the permutations that returned model errors or warnings (e.g. model convergence issues) and for which new permutations were done.
Sebastian Sosa, Ivan Puga-Gonzalez.
Chambers, J. M. (1992) Linear models. Chapter 4 of Statistical Models in S eds J. M. Chambers and T. J. Hastie, Wadsworth & Brooks/Cole.
Wilkinson, G. N. and Rogers, C. E. (1973) Symbolic descriptions of factorial models for analysis of variance. Applied Statistics, 22, 392–9.
lm
t=met.strength(sim.m,sim.df,1) # Computing network metric
t=perm.net.nl(t,labels='age',rf=NULL,nperm=10,progress=FALSE) # Node label permutations
r.lm=stat.lm(t,formula = strength ~ age,progress=FALSE) # Permuted LM
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.