Browse code

first commit

y.tan authored on 21/04/2018 19:57:54
Showing1 changed files
... ...
@@ -33,8 +33,6 @@ NULL. pathdiagram will create one-level path diagram labeled with colors.
33 33
 \author{
34 34
 Yuan-De Tan
35 35
 \email{tanyuande@gmail.com}
36
-
37
-\\Dajiang Liu
38 36
 }
39 37
 
40 38
 \seealso{
Browse code

Adding SpidermiR, DRIMSeq, debrowser, GMRP, ISoLDE, CountClust, OncoScore, AneuFinder, recoup, genphen, DEFormats, sscu

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/GMRP@115200 bc3139a8-67e5-0310-9ffc-ced21a209358

Martin Morgan authored on 23/03/2016 22:36:02
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,63 @@
1
+\name{pathdiagram}
2
+\alias{pathdiagram}
3
+\title{
4
+Path Diagram
5
+}
6
+\description{
7
+Create a directed acyclic diagram to represent causal effects of risk factors on the disease of study.
8
+}
9
+\usage{
10
+pathdiagram(pathdata, disease, R2, range)
11
+}
12
+\arguments{
13
+  \item{pathdata}{
14
+R object that is dataset consisting of correlation matrix of risk factors and a numeric vector of direct path coefficients.
15
+}
16
+  \item{disease}{
17
+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 \code{CAD}.
18
+}
19
+  \item{R2}{
20
+a numeric parameter, is R-square obtained from path analysis.
21
+}
22
+  \item{range}{
23
+range of specified columns for correlation matrix. For example, \code{range = c(2:4)} means the correlation coefficient begins with column 2 and end at column 4.
24
+}
25
+}
26
+\details{
27
+The \emph{pathdata} contains correlation matrix of risk factors and a numeric vector of direct path coefficients obtained from path analysis of beta data of \code{SNP}s on risk factors and disease. Columns must have risk factor names and path.
28
+}
29
+\value{
30
+NULL. pathdiagram will create one-level path diagram labeled with colors.
31
+}
32
+
33
+\author{
34
+Yuan-De Tan
35
+\email{tanyuande@gmail.com}
36
+
37
+\\Dajiang Liu
38
+}
39
+
40
+\seealso{
41
+    \code{\link{pathdiagram2}}, \code{\link[diagram]{plotmat}}, \code{\link[diagram]{plotweb}}
42
+}
43
+
44
+\examples{
45
+
46
+mypath<-matrix(NA,3,4)
47
+mypath[1,]<-c(1.000000,-0.066678, 0.420036,0.764638)
48
+mypath[2,]<-c(-0.066678,1.000000,-0.559718,0.496831)
49
+mypath[3,]<-c(0.420036,-0.559718,1.000000,0.414346)
50
+colnames(mypath)<-c("ldl","hdl","tg","path")
51
+
52
+#mypath
53
+#        ldl       hdl        tg      path
54
+#1  1.000000 -0.066678  0.420036  0.764638
55
+#2 -0.066678  1.000000 -0.559718  0.496831
56
+#3  0.420036 -0.559718  1.000000  0.414346
57
+
58
+mypath<-as.data.frame(mypath)
59
+pathdiagram(pathdata=mypath,disease="cad",R2=0.988243,range=c(1:3))
60
+}
61
+
62
+\keyword{path }
63
+\keyword{diagram}