[R] pcalg library : estimated DAG graph
varin sacha
v@r|n@@ch@ @end|ng |rom y@hoo@|r
Wed Apr 6 21:54:14 CEST 2022
Many thanks for your responses.
Best,
SV
Le vendredi 1 avril 2022, 07:25:00 UTC+2, PIKAL Petr <petr.pikal using precheza.cz> a écrit :
Hallo
It is not obvious what is your problem. You maybe should go through some
articles about functions in the package.
https://pdfs.semanticscholar.org/aee5/cca63aad422c96ee637b5561bb051724d76c.pdf?_ga=2.241710466.1872226166.1648790330-1600227915.1617009045
or maybe you do not have Rgraphviz package installed as required by plotting
functions of the package.
R> stopifnot(require(Rgraphviz))# needed for all our graph plots
Cheers
Petr
> -----Original Message-----
> From: R-help <r-help-bounces using r-project.org> On Behalf Of varin sacha via
> R-help
> Sent: Friday, April 1, 2022 12:09 AM
> To: r-help using r-project.org
> Subject: [R] pcalg library : estimated DAG graph
>
> Dear R-experts,
>
> Here below my R code working but I don't know how I can get the graph
> (estimated DAG).
> If you could help me to get the graph, many thanks.
>
>
> ###################
> library(pcalg)
>
> x1<-
> c(508,413,426,500,568,372,484,512,529,322,544,586,480,561,567,488,450,
> 548,526,561,435,567,537,521,516,407,531,374,406,595,460,420,453,562,53
> 0)
>
> x2<-
> c(531,491,353,522,341,493,431,565,530,441,403,498,552,513,513,403,445,
> 424,529,486,519,492,397,579,479,511,535,504,465,520,517,528,542,483,49
> 9)
>
> x3<-
> c(541,451,510,649,329,464,511,609,643,530,568,366,371,442,611,437,445,
> 589,605,456,437,179,540,580,587,540,505,310,542,488,525,483,200,517,51
> 3)
>
> x4<-
> c(488,473,449,564,447,593,420,685,597,534,608,389,557,385,564,449,530,
> 615,502,510,412,321,509,480,469,594,506,431,555,567,491,414,359,418,46
> 8)
>
> x5<-
> c(487,430,419,583,469,369,540,637,563,328,498,448,356,552,521,417,513,
> 570,530,594,372,537,469,454,554,518,550,384,533,594,467,471,590,552,55
> 6)
>
> x6<-
> c(511,452,432,563,431,458,477,601,572,431,524,458,463,491,555,439,477,
> 549,539,521,435,419,490,523,521,514,525,401,500,553,492,463,429,506,51
> 3)
>
> X=cbind(x1,x2,x3,x4,x5,x6)
>
> res1=lingam(X,verbose=TRUE)
> cat("estimated DAG:/n")
> as(res1,"amat")
> res1
> ###################
>
>
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list