rint.regs: Many simple linear mixed model regressions

View source: R/ranef_mle_regressions_repeated_measures.R

Many simple linear mixed model regressionsR Documentation

Many simple linear mixed model regressions

Description

Many simple linear mixed model regressions with random intercepts only.

Usage

rint.regs(y, x, id, tol = 1e-08, logged = FALSE, parallel = FALSE, maxiters = 100) 

Arguments

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 10^{-9} by default.

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.

Details

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.

Value

A two-column matrix with the test statistics (Wald statistic) and the associated p-values (or their loggarithm).

Author(s)

Stefanos Fafalios.

R implementation and documentation: Stefanos Fafalios <stefanosfafalios@gmail.com>.

References

Eugene Demidenko (2013). Mixed Models: Theory and Applications with R, 2nd Edition. New Jersey: Wiley & Sons (excellent book).

See Also

rint.reg, allbetas univglms, score.glms, logistic_only

Examples

## 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

Rfast documentation built on Nov. 9, 2023, 5:06 p.m.