[R] pcalg library : estimated DAG graph
Bert Gunter
bgunter@4567 @end|ng |rom gm@||@com
Fri Apr 1 00:28:44 CEST 2022
Getting help here on non-standard packages -- there are tens of thousands
-- is technically off topic (see the Posting Guide linked below) and hence
you should not be surprised if you do not get a useful reply, though you
may, of course.
You might have better luck posting on r-sig-networks,
https://stat.ethz.ch/mailman/listinfo/r-sig-networks, as it says on its
homepage that this SIG is specifically for those interested in "graph-
related software" within R.
Bert Gunter
"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Thu, Mar 31, 2022 at 3:06 PM varin sacha via R-help <r-help using r-project.org>
wrote:
> 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,530)
>
> 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,499)
>
>
>
> 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,513)
>
> 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,468)
>
>
>
> 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,556)
>
> 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,513)
>
>
> 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.
>
[[alternative HTML version deleted]]
More information about the R-help
mailing list