Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rint.regs

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

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

A Collection of Efficient and Extremely Fast R Functions

v2.0.1
GPL (>= 2.0)
Authors
Manos Papadakis, Michail Tsagris, Marios Dimitriadis, Stefanos Fafalios, Ioannis Tsamardinos, Matteo Fasiolo, Giorgos Borboudakis, John Burkardt, Changliang Zou, Kleanthi Lakiotaki and Christina Chatzipantsiou.
Initial release
2020-09-13

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.