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

Create a directed acyclic diagram to represent causal effects of risk factors on the disease of study.

1 | ```
pathdiagram(pathdata, disease, R2, range)
``` |

`pathdata` |
R object that is dataset consisting of correlation matrix of risk factors and a numeric vector of direct path coefficients. |

`disease` |
a string that specifies outcome name or disease name. If disease name is long or has multiple words, then we suggest an abbreviated name, for example, coronary artery disease may be shortened as |

`R2` |
a numeric parameter, is R-square obtained from path analysis. |

`range` |
range of specified columns for correlation matrix. For example, |

The *pathdata* contains correlation matrix of risk factors and a numeric vector of direct path coefficients obtained from path analysis of beta data of `SNP`

s on risk factors and disease. Columns must have risk factor names and path.

NULL. pathdiagram will create one-level path diagram labeled with colors.

Yuan-De Tan tanyuande@gmail.com

\Dajiang Liu

`pathdiagram2`

, `plotmat`

, `plotweb`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ```
mypath<-matrix(NA,3,4)
mypath[1,]<-c(1.000000,-0.066678, 0.420036,0.764638)
mypath[2,]<-c(-0.066678,1.000000,-0.559718,0.496831)
mypath[3,]<-c(0.420036,-0.559718,1.000000,0.414346)
colnames(mypath)<-c("ldl","hdl","tg","path")
#mypath
# ldl hdl tg path
#1 1.000000 -0.066678 0.420036 0.764638
#2 -0.066678 1.000000 -0.559718 0.496831
#3 0.420036 -0.559718 1.000000 0.414346
mypath<-as.data.frame(mypath)
pathdiagram(pathdata=mypath,disease="cad",R2=0.988243,range=c(1:3))
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.