楼主: sangaj
8008 5

[问答] R中aov的ERROR问题 [推广有奖]

  • 0关注
  • 0粉丝

本科生

49%

还不是VIP/贵宾

-

威望
0
论坛币
36 个
通用积分
0
学术水平
5 点
热心指数
5 点
信用等级
10 点
经验
1988 点
帖子
51
精华
0
在线时间
76 小时
注册时间
2013-6-10
最后登录
2016-11-23

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
我想问下在aov具体的模型变量中可以用Error()表示,这是什么含义,比如给的例子里有
npk.aovE <- aov(yield ~  N*P*K + Error(block), npk)
npk.aovE
summary(npk.aovE)
options(op)  # reset to previous

这里的Error()是什么意思?
二维码

扫码加我 拉你入群

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

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

关键词:Error err ERROR

沙发
蓝色 发表于 2015-3-14 21:37:07 |只看作者 |坛友微信交流群
帮助里面只简单解释一点啊
不明白
看看哪位能解释一下

aov {stats}

R Documentation

Fit an Analysis of Variance Model

Description

Fit an analysis of variance model by a call to lm for each stratum.

Usage

aov(formula, data = NULL, projections = FALSE, qr = TRUE,

    contrasts = NULL, ...)

Arguments

formula

A formula specifying the model.

data

A data frame in which the variables specified in the formula will be found. If missing, the variables are searched for in the standard way.

projections

Logical flag: should the projections be returned?

qr

Logical flag: should the QR decomposition be returned?

contrasts

A list of contrasts to be used for some of the factors in the formula. These are not used for any Error term, and supplying contrasts for factors only in the Error term will give a warning.

...

Arguments to be passed to lm, such as subset or na.action. See ‘Details’ about weights.

Details

This provides a wrapper to lm for fitting linear models to balanced or unbalanced experimental designs.

The main difference from lm is in the way print, summary and so on handle the fit: this is expressed in the traditional language of the analysis of variance rather than that of linear models.

If the formula contains a single Error term, this is used to specify error strata, and appropriate models are fitted within each error stratum.

The formula can specify multiple responses.

Weights can be specified by a weights argument, but should not be used with an Error term, and are incompletely supported (e.g., not by model.tables).

Value

An object of class c("aov", "lm") or for multiple responses of class c("maov", "aov", "mlm", "lm") or for multiple error strata of class "aovlist". There are print and summary methods available for these.

Note

aov is designed for balanced designs, and the results can be hard to interpret without balance: beware that missing values in the response(s) will likely lose the balance. If there are two or more error strata, the methods used are statistically inefficient without balance, and it may be better to use lme in package nlme.


使用道具

藤椅
DM小菜鸟 发表于 2015-3-30 17:12:42 |只看作者 |坛友微信交流群
参数:formula
A formula specifying the model.
指定的模型公式。

参数:data
A data frame in which the variables specified in the formula will be found. If missing, the variables are searched for in the standard way.
一个数据框,在该公式中指定的变量会被发现。如果缺少,变量为标准的方式进行搜索。

参数:projections
Logical flag: should the projections be returned
逻辑标志:应被退回的预测

参数:qr
Logical flag: should the QR decomposition be returned
逻辑标志:应返回QR分解

参数:contrasts
A list of contrasts to be used for some of the factors in the formula. These are not used for any Error term, and supplying contrasts for factors only in the Error term will give a warning.
公式中的一些因素的对比列表。这些都不给任何Error,只有在Error时才给予警告。

使用道具

板凳
fisk_all_star 发表于 2015-5-22 19:40:50 |只看作者 |坛友微信交流群
楼主知道什么意思了吗?我遇到同样的问题了,我感觉3楼翻译的不对。

使用道具

报纸
fisk_all_star 发表于 2015-5-22 19:55:21 |只看作者 |坛友微信交流群
楼主我知道什么意思了,这是使用aov方程做分析所要求的公式形式。
以下为引用:
在重复测量的方差分析中,实验对象被测量多次,所以会存在组内因子,组内因子要以下面的形式特别标明出来,其中B是组间因子,W是组内因子,subject是实验对象的ID,
model=aov(Y ~ B * W + Error(Subject/W))
上述方法的前提是对应组内因子不同水平的数据是等方差的,当传统方法的假设得不到满足时,则应用lme4包中lmer函数,利用混合效应模型来解决问题。

使用道具

地板
sangaj 发表于 2015-6-28 19:18:39 |只看作者 |坛友微信交流群
fisk_all_star 发表于 2015-5-22 19:55
楼主我知道什么意思了,这是使用aov方程做分析所要求的公式形式。
以下为引用:
在重复测量的方差分析中, ...
好的,谢谢

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-5-2 01:34