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@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.