全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 R语言论坛
6985 1
2008-05-13

小弟想做多元总体的均值和方差检验,可是程序不知如何写!

期待各位大哥大姐的帮助!

谢谢先!

:)

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2008-5-13 22:06:00

summary.manova and mauchly.test

You could use summary.manova and mauchly.test

for help type ?summary.manova, ?mauchly.test in R.

Examples from R help:

   ## Example on producing plastic film from Krzanowski (1998, p. 381)
     tear <- c(6.5, 6.2, 5.8, 6.5, 6.5, 6.9, 7.2, 6.9, 6.1, 6.3,
               6.7, 6.6, 7.2, 7.1, 6.8, 7.1, 7.0, 7.2, 7.5, 7.6)
     gloss <- c(9.5, 9.9, 9.6, 9.6, 9.2, 9.1, 10.0, 9.9, 9.5, 9.4,
                9.1, 9.3, 8.3, 8.4, 8.5, 9.2, 8.8, 9.7, 10.1, 9.2)
     opacity <- c(4.4, 6.4, 3.0, 4.1, 0.8, 5.7, 2.0, 3.9, 1.9, 5.7,
                  2.8, 4.1, 3.8, 1.6, 3.4, 8.4, 5.2, 6.9, 2.7, 1.9)
     Y <- cbind(tear, gloss, opacity)
     rate <- factor(gl(2,10), labels=c("Low", "High"))
     additive <- factor(gl(2, 5, len=20), labels=c("Low", "High"))

     fit <- manova(Y ~ rate * additive)
     summary.aov(fit)           # univariate ANOVA tables
     summary(fit, test="Wilks") # ANOVA table of Wilks' lambda


     example(SSD) # Brings in the mlmfit and reacttime objects

     ### traditional test of intrasubj. contrasts
     mauchly.test(mlmfit, X=~1)

     ### tests using intra-subject 3x2 design
     idata <- data.frame(deg=gl(3,1,6, labels=c(0,4,8)),
                         noise=gl(2,3,6, labels=c("A","P")))
     mauchly.test(mlmfit, X = ~ deg + noise, idata = idata)
     mauchly.test(mlmfit, M = ~ deg + noise, X = ~ noise, idata=idata)

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群