看板 Statistics 關於我們 聯絡資訊
※ 引述《linda841004 (水凝結)》之銘言: : [軟體程式類別]: : SAS、R : [程式問題]: : normal correlation model 圖形製作 : [軟體熟悉度]: : 語言:新手 : SAS:熟悉 : [問題敘述]: : 請問如何使用SAS或R語言做出normal correlation model圖形 : 如下圖: : http://i.imgur.com/t87Cyh8.jpg : 有沒有人曾經做過? : 或是可以稍微指點一下 : [程式範例]: : 無 : ----- : Sent from JPTT on my HTC_M8Sx. 我只會用R... 我給一點示範R code library(data.table) library(lattice) pts <- seq(-5, 5, length.out = 40) DT <- data.table(expand.grid(pts, pts)) # assume two-dimensional normal distribution with identity covariance DT[ , density := dnorm(Var1) * dnorm(Var2)] # plot wireframe(density ~ Var1 + Var2, DT, drape = TRUE) 成果圖: http://imgur.com/a/Jy09h -- R資料整理套件系列文: magrittr #1LhSWhpH (R_Language) https://goo.gl/OBto1x data.table #1LhW7Tvj (R_Language) https://goo.gl/QFtp17 dplyr(上.下) #1LhpJCfB,#1Lhw8b-s (R_Language) https://goo.gl/GcfNoP tidyr #1Liqls1R (R_Language) https://goo.gl/pcq5nq pipeR #1NXESRm5 (R_Language) https://goo.gl/cDIzTh -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 118.170.41.113 ※ 文章網址: https://www.ptt.cc/bbs/Statistics/M.1477400971.A.FD5.html
linda841004: 感謝感謝,雖然不太會用R 我會好好研究 10/26 14:27
celestialgod: 如果要非獨立的話,用MASS套件的dmvnorm 10/26 19:13