View source: R/ranef_mle_regressions_repeated_measures.R
Many simple linear mixed model regressions | R Documentation |
Many simple linear mixed model regressions with random intercepts only.
rint.regs(y, x, id, tol = 1e-08, logged = FALSE, parallel = FALSE, maxiters = 100)
y |
A numerical vector with the data. The subject values, the clustered data. |
x |
A numerical matrix with data ,the independent variables. |
id |
A numerical variable with 1, 2, ... indicating the subject. Unbalanced design is of course welcome. |
tol |
The tolerance value to terminate the Newton-Raphson algorithm. This is set to |
logged |
Should the p-values be returned (FALSE) or their logarithm (TRUE)? |
parallel |
Do you want this to be executed in parallel or not. The parallel takes place in C++, and the number of threads is defined by each system's availiable cores. |
maxiters |
The max number of iterations that can take place in each regression. |
Many linear mixed models with a single covariate are fitted. We use Newton-Raphson as described in Demidenko (2013). The test statistic is the usual F-test. This model allows for random intercepts only.
A two-column matrix with the test statistics (Wald statistic) and the associated p-values (or their loggarithm).
Stefanos Fafalios.
R implementation and documentation: Stefanos Fafalios <stefanosfafalios@gmail.com>.
Eugene Demidenko (2013). Mixed Models: Theory and Applications with R, 2nd Edition. New Jersey: Wiley & Sons (excellent book).
rint.reg, allbetas univglms, score.glms, logistic_only
## not a so good example
y <- rnorm(100)
id <- sample(1:10, 100, replace = TRUE)
x <- matrix( rnorm(100 * 100), ncol = 100)
a <- rint.regs(y, x, id)
x <- NULL
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.