path: Path Analysis

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/path.R

Description

path is used to perform path analysis of multiple causal or risk variables on an outcome or disease of study.

Usage

1
path(betav,model,outcome)

Arguments

betav

a matrix numeric data with p rows and q columns in which the first column must be outcome and other columns are risk variables.

model

a linear model for multivariate linear regression analysis. The model must be given in R Console. For example, mymodel<-CAD~LDL+HDL+TG+TC.

outcome

a string that is required to give outcome name or disease name. For example, outcome="CAD".

Details

path is originally planed to perform causal analysis of risk variables on disease of study based on the results of the Mendelian randomization analysis of SNPs on these risk variables and disease. In the GMRP package, the betav is a matrix of beta coefficients of linear regression analyses of chosen SNPs on the risk (or causal) variables and disease or outcome. The beta values are equivalently quantitative values, so this path function can also be used to analyze direct and indirect contributions of quantitative traits to economic traits.

Value

Return three matrices: beta coefficients of regressions of risk variables on outcome or disease, correlation matrix and path matrix and also return director path coefficients and R-square.

Note

betav may also be a matrix of SNP path coefficients onto risk variables and disease.

Author(s)

Yuan-De Tan tanyuande@gmail.com

References

Do, R. et al. 2013 Common variants associated with plasma triglycerides and risk for coronary artery disease. Nat Genet 45: 1345-1352.
Sheehan, N.A. et al. 2008 Mendelian randomisation and causal inference in observational epidemiology. PLoS Med 5: e177.
Sheehan, N.A.,et al. 2010 Mendelian randomisation: a tool for assessing causality in observational epidemiology. Methods Mol Biol 713: 153-166.
Wright, S. 1921 Correlation and causation. J.Agricultural Research 20: 557-585.
Wright, S. 1934 The method of path coefficients. Annals of Mathematical Statistics 5 (3): 161-215.

See Also

link[base]{lm},link[stats]{cor}

Examples

1
2
3
4
5
data(beta.data)	
mybeta<-DataFrame(beta.data)
#mybeta<-as.data.frame(beta.data)
mod<-cad~ldl+hdl+tg+tc
pathvalue<-path(betav=mybeta,model=mod,outcome="cad")

GMRP documentation built on Nov. 8, 2020, 5:58 p.m.