lmrse | R Documentation |
lmrse
fits a linear regression model with cluster robust
standard errors for all markers.
lmrse(formula, cluster, data = NULL)
formula |
containing the marker matrix as the response and the exposure and covariates as the dependent terms |
cluster |
clustering variable |
data |
an optional |
lmrse
returns a list
of coefficients, standard errors and
p-values matrices:
coef |
a matrix of regression coefficients |
se |
a matrix of standard errors |
p |
a matrix of p-values |
James Staley jrstaley95@gmail.com
# Data
y <- rnorm(5000000)
y <- matrix(y, ncol = 1000)
colnames(y) <- paste0("var", 1:1000)
x <- rnorm(5000)
cluster <- rep(1:1000, 5)
c1 <- rbinom(5000, 1, 0.5)
c2 <- rnorm(5000)
# Analyses
res <- lmrse(y ~ x + c1 + c2, cluster = cluster)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.