mvshape | R Documentation |
mvshape fits a multivariate meta-analysis for groups of the exposure (e.g. deciles).
mvshape(
y = y,
x = x,
covar = NULL,
study = NULL,
ngrp = 10,
refgrp = 1,
family = "gaussian",
float = FALSE,
method = "reml"
)
y |
outcome. |
x |
exposure. |
covar |
data.frame with covariates. |
study |
study variable. |
ngrp |
number of quantiles of the exposure. |
refgrp |
reference group. |
family |
the glm family (options: gaussian and binomial). |
float |
floating point variances. |
method |
meta-analysis method. |
List of multivariate meta-analysis results for each group.
results |
data.frame of results: q is the quantile group, xbeta is the mean of x in each quantile, xse is the standard error of the mean of x in each quantile, beta is the regression coefficient of association between y and each quantile of x, se is the standard error of the regression coefficient of association between y and each quantile of x |
varcor |
variance-covariance matrix |
xmin |
miniumum value of the exposure |
xmax |
maximum value of the exposure |
family |
family used in the analysis |
James Staley jrstaley95@gmail.com
# Data
y <- rnorm(5000)
x <- rnorm(5000, 10, 1)
c1 <- rbinom(5000, 1, 0.5)
c2 <- rnorm(5000)
study <- c(rep("study1", 1000), rep("study2", 1000), rep("study3", 1000), rep("study4", 1000), rep("study5", 1000))
covar <- data.frame(c1 = c1, c2 = c2, study = study)
# Analyses
res <- mvshape(y = y, x = x, covar = covar[, c("c1", "c2")], study = study, family = "gaussian")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.