由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - 弱问到底什么是fixed/random effect model?
相关主题
mixed linear model 里面fixed effect 和 random effectRandom and repeated in mixed model
SAS-GLM random effects questionsGEE and Random effect model
mixed effects model 请教【请教】Stata中random effects的standard error
[Help] SAS Proc mixedkabam 面经
为什么fixed effect没有变化?问一个anova里关于model identifiability的问题
谁能说说如何区分fixed effect, random effectsmixed model 问题,请各位帮忙。
R lme random effect output, waiting online for responseTesting Random Effects in GLMM?
外行请教:这个问题有没有答案?a quesiton about random effect
相关话题的讨论汇总
话题: random话题: effect话题: fixed话题: model话题: effects
进入Statistics版参与讨论
1 (共1页)
m******u
发帖数: 11
1
一直搞不清楚,大家帮忙看看我理解的对不对?
linear regression model Y=Beta*X+Error X=(x1,x2,...xp)
如果x1...xp的值全是固定的,叫做fixed effect model
如果x1...xp的值全是随机的,叫做random effect model
如果有的固定,有的随机,叫做mixed effect model
是这样吗?
I*****a
发帖数: 5425
2
说的是beta

【在 m******u 的大作中提到】
: 一直搞不清楚,大家帮忙看看我理解的对不对?
: linear regression model Y=Beta*X+Error X=(x1,x2,...xp)
: 如果x1...xp的值全是固定的,叫做fixed effect model
: 如果x1...xp的值全是随机的,叫做random effect model
: 如果有的固定,有的随机,叫做mixed effect model
: 是这样吗?

m******u
发帖数: 11
3
不明白
http://zh.wikipedia.org/wiki/%E6%96%B9%E5%B7%AE%E5%88%86%E6%9E%
这个页面关于fixed effects model这样写:
用于方差分析模型中所考虑的因子为固定的情况,换言之,其所感兴趣的因子是来自于
特定的范围,例如要比较五种不同的汽车销售量的差异,感兴趣的因子为五种不同的汽
车,反应变量为销售量,该命题即限定了特定范围,因此模型的推论结果也将全部着眼
在五种汽车的销售差异上,故此种状况下的因子便称为固定效应。
这里的“因子”难道不是自变量x?

【在 I*****a 的大作中提到】
: 说的是beta
m******u
发帖数: 11
4
而且beta不是constant么,何来fixed/random之说

【在 I*****a 的大作中提到】
: 说的是beta
c********h
发帖数: 330
5
如果一个factor的levels是fixed,比如gender,只有male和female,一般就
incoporate as fixed effect
如果一个factor的levels只是对应于某个实验或者observational study,比如说
batches,subjects,换了别的实验就不是这些levels了,那么一般用random effect
如果一个model have both fixed effects and random effects,那么就是mixed
effect model
m******u
发帖数: 11
6
factor是指x还是beta? 或者两者都不是?
我看一些相关文章都提到dummy variable...看得云里雾里,effect到底指的什么啊

【在 c********h 的大作中提到】
: 如果一个factor的levels是fixed,比如gender,只有male和female,一般就
: incoporate as fixed effect
: 如果一个factor的levels只是对应于某个实验或者observational study,比如说
: batches,subjects,换了别的实验就不是这些levels了,那么一般用random effect
: 如果一个model have both fixed effects and random effects,那么就是mixed
: effect model

a****g
发帖数: 8131
7
factors are xs
beta are parameters

【在 m******u 的大作中提到】
: factor是指x还是beta? 或者两者都不是?
: 我看一些相关文章都提到dummy variable...看得云里雾里,effect到底指的什么啊

m******u
发帖数: 11
8
http://en.wikipedia.org/wiki/Linear_regression#Assumptions
linear regression model的assumption包括
the predictor variables x can be treated as fixed values, rather than random
variables
所以linear regression model都是fixed effect model?

【在 a****g 的大作中提到】
: factors are xs
: beta are parameters

I*****a
发帖数: 5425
9
http://en.wikipedia.org/wiki/Mixed_model
in YOUR parameterization, beta can't be constant if you use Xbeta to
represent both fixed and random effect. The wikipedia doc is pretty clear.

【在 m******u 的大作中提到】
: 而且beta不是constant么,何来fixed/random之说
m******u
发帖数: 11
10
就按照这页的写法好了,beta和mu不是coefficient吗,不是常数吗
所谓fixed/random不是指regressor(X和Z)吗

【在 I*****a 的大作中提到】
: http://en.wikipedia.org/wiki/Mixed_model
: in YOUR parameterization, beta can't be constant if you use Xbeta to
: represent both fixed and random effect. The wikipedia doc is pretty clear.

相关主题
谁能说说如何区分fixed effect, random effectsRandom and repeated in mixed model
R lme random effect output, waiting online for responseGEE and Random effect model
外行请教:这个问题有没有答案?【请教】Stata中random effects的standard error
进入Statistics版参与讨论
F****r
发帖数: 151
11
X and Z are observed data (factor levels)
Beta are estimated fixed effects.
mu are estimated random effects.
You may notice the difference between beta and mu:
beta's are unknown constants to be estimated. this is the fixed effect.
mu is assumed to follow a distribution. This is the random effect.
c****t
发帖数: 19049
12
这都什么乱七八糟的。
fixed effects就是说你在严格控制的实验条件下观测了一批数据,而且你认为它们都
是符合某种条件的random variables; random effects就是说你测数据时没法严格控制
,所以观测结果受某个或某些没控制的random variable(s)影响了。最常见的情况,比
如你的数据不是控制实验下得来的,所以有很多dependency,或者比如你观测的东东有
自然grouping,你没法直接观测也没法控制
c****u
发帖数: 243
13
"就是说你测数据时没法严格控制,所以观测结果受某个或某些没控制的random
variable(s)影响了"
It is called measurement error, not random effect.
when beta (unknown) is not fixed for every observation,
e.g. following some distribution, it is called the random effect.

【在 c****t 的大作中提到】
: 这都什么乱七八糟的。
: fixed effects就是说你在严格控制的实验条件下观测了一批数据,而且你认为它们都
: 是符合某种条件的random variables; random effects就是说你测数据时没法严格控制
: ,所以观测结果受某个或某些没控制的random variable(s)影响了。最常见的情况,比
: 如你的数据不是控制实验下得来的,所以有很多dependency,或者比如你观测的东东有
: 自然grouping,你没法直接观测也没法控制

I*****a
发帖数: 5425
14
Don't mislead louzhu

【在 c****t 的大作中提到】
: 这都什么乱七八糟的。
: fixed effects就是说你在严格控制的实验条件下观测了一批数据,而且你认为它们都
: 是符合某种条件的random variables; random effects就是说你测数据时没法严格控制
: ,所以观测结果受某个或某些没控制的random variable(s)影响了。最常见的情况,比
: 如你的数据不是控制实验下得来的,所以有很多dependency,或者比如你观测的东东有
: 自然grouping,你没法直接观测也没法控制

c***z
发帖数: 6348
15
Weird, I found the Chinese version harder to understand...
If you are talking about panel data, here is a link
http://www.princeton.edu/~otorres/Panel101.pdf
In short:
The fixed-effects model controls for all time-invariant
differences between the individuals, so the estimated
coefficients of the fixed-effects models cannot be biased
because of omitted time-invariant characteristics…[like culture,
religion, gender, race, etc]
One side effect of the features of fixed-effects models is that
they cannot be used to investigate time-invariant causes of the
dependent variables.
The rationale behind random effects model is that, unlike the fixed effects
model, the variation across entities is assumed to be random and
uncorrelated with the predictor or independent variables included in the
model.

【在 m******u 的大作中提到】
: 不明白
: http://zh.wikipedia.org/wiki/%E6%96%B9%E5%B7%AE%E5%88%86%E6%9E%
: 这个页面关于fixed effects model这样写:
: 用于方差分析模型中所考虑的因子为固定的情况,换言之,其所感兴趣的因子是来自于
: 特定的范围,例如要比较五种不同的汽车销售量的差异,感兴趣的因子为五种不同的汽
: 车,反应变量为销售量,该命题即限定了特定范围,因此模型的推论结果也将全部着眼
: 在五种汽车的销售差异上,故此种状况下的因子便称为固定效应。
: 这里的“因子”难道不是自变量x?

c***z
发帖数: 6348
16
“…the crucial distinction between fixed and
random effects is whether the unobserved
individual effect embodies elements that ar
e correlated with the regressors in the
model, not whether these effects are
stochastic or not” [Green, 2008, p.183]
c****u
发帖数: 243
17
How to explain dummy variable?

【在 c***z 的大作中提到】
: “…the crucial distinction between fixed and
: random effects is whether the unobserved
: individual effect embodies elements that ar
: e correlated with the regressors in the
: model, not whether these effects are
: stochastic or not” [Green, 2008, p.183]

c***z
发帖数: 6348
18
As usual.
If you use LM, then the usual LM way; if you use GLM, then the usual GLM way
...

【在 c****u 的大作中提到】
: How to explain dummy variable?
c****u
发帖数: 243
19
I mean how to use the logic in your cite to explain fixed/random effect for
a dummy variable?

way

【在 c***z 的大作中提到】
: As usual.
: If you use LM, then the usual LM way; if you use GLM, then the usual GLM way
: ...

c***z
发帖数: 6348
20
How do you usually explain the effect of a dummy variable?

for

【在 c****u 的大作中提到】
: I mean how to use the logic in your cite to explain fixed/random effect for
: a dummy variable?
:
: way

相关主题
kabam 面经Testing Random Effects in GLMM?
问一个anova里关于model identifiability的问题a quesiton about random effect
mixed model 问题,请各位帮忙。Use random effect model on panel data?
进入Statistics版参与讨论
c****t
发帖数: 19049
21
嘿嘿书本背得挺溜。您懂您自己说得在现实中是深嘛意思吗

【在 c****u 的大作中提到】
: "就是说你测数据时没法严格控制,所以观测结果受某个或某些没控制的random
: variable(s)影响了"
: It is called measurement error, not random effect.
: when beta (unknown) is not fixed for every observation,
: e.g. following some distribution, it is called the random effect.

c****t
发帖数: 19049
22
您一个改行的还是慎用深嘛"don't mislead"

【在 I*****a 的大作中提到】
: Don't mislead louzhu
h***i
发帖数: 3844
23
correct ,effect means coefficient.

【在 I*****a 的大作中提到】
: 说的是beta
c****u
发帖数: 243
24
看来您书都看不懂,更背不了,
您这是请求别人教你吗?

【在 c****t 的大作中提到】
: 嘿嘿书本背得挺溜。您懂您自己说得在现实中是深嘛意思吗
c****u
发帖数: 243
25
are you asking for advice?
or don't know how to explain the dummy variable using your cite?

【在 c***z 的大作中提到】
: How do you usually explain the effect of a dummy variable?
:
: for

c***z
发帖数: 6348
26
I meant, just do whatever you do when there is no time dimension
For example, http://www.socsci.uci.edu/~schofer/2007soc8811/pub/Class%203%20Mult%20Reg%202%201.0.ppt
page 17
PS:
If I am asking for advice, I would say 'please' and 'thank you'

【在 c****u 的大作中提到】
: are you asking for advice?
: or don't know how to explain the dummy variable using your cite?

c****t
发帖数: 19049
27
呵呵看来您不知道自己说反了。random effects之所以要用不同的设定是因为所用的
predictor表现特别;而不是因为不同的coefficient设定才把一个predictor变成了
random effect
比如说楼主决定用income作predictor,如果一个intercept,一个slope就可以算出不错
的prediction,那么fixed effect model就搞定。需要做random effect model最简单(
但不是最常见)的情况:不同income有不同的intercepts(假定slope还都一样)。比如
0-50k intercept 1000, 50k-100k intercept 1, 100k+ intercept 10。这样的
relationship不是linear,linear model可以做但predicition不好。而用smoother也许
能提高prediction但不make sense。这时用random effect model效果最好。
为深嘛这predictor这么特别。原因是income其实不是最合适的predictor,只是最合适
的variables是啥大家不知道,或没法得到data,甚或没法观测所以跟income啥关系也不
知道。这种情况下用income做predicotr是不得已的。另一种较常见情况是各人的
income并不完全independent。sample中有人来自同一行业,或相近地区,造成了
natural grouping。实际上情况类似,也是说income不是最好的predictor。缺
variables,学名叫latent variables
categorical variable一样。最简单的例子是gender,如果生理差别可以帮助很好的做
prediction,那这就是fixed effect。如果实际上跟response相关的是别的东东,
gender只是proxy,那么gender就不必是binary,而是可以像F家一样弄出20多个。Green
说的coefficent distribution跟random effect相关就是说尤于random effect
variable只是个proxy,所以分组不唯一。
把categorical variable叫作dummy variable,不懂latent variable,把random error
叫做measurement error都是特定的某类人嘿嘿

【在 c****u 的大作中提到】
: 看来您书都看不懂,更背不了,
: 您这是请求别人教你吗?

I*****a
发帖数: 5425
28
用楼主摘的例子:
“用于方差分析模型中所考虑的因子为固定的情况,换言之,其所感兴趣的因子是来自于
特定的范围,例如要比较五种不同的汽车销售量的差异,感兴趣的因子为五种不同的汽
车,反应变量为销售量,该命题即限定了特定范围,因此模型的推论结果也将全部着眼
在五种汽车的销售差异上,故此种状况下的因子便称为固定效应。”
把5种汽车作为fixed 还是 random,是怎么和“实验,数据收集是否可以控制”相关的?

【在 c****t 的大作中提到】
: 呵呵看来您不知道自己说反了。random effects之所以要用不同的设定是因为所用的
: predictor表现特别;而不是因为不同的coefficient设定才把一个predictor变成了
: random effect
: 比如说楼主决定用income作predictor,如果一个intercept,一个slope就可以算出不错
: 的prediction,那么fixed effect model就搞定。需要做random effect model最简单(
: 但不是最常见)的情况:不同income有不同的intercepts(假定slope还都一样)。比如
: 0-50k intercept 1000, 50k-100k intercept 1, 100k+ intercept 10。这样的
: relationship不是linear,linear model可以做但predicition不好。而用smoother也许
: 能提高prediction但不make sense。这时用random effect model效果最好。
: 为深嘛这predictor这么特别。原因是income其实不是最合适的predictor,只是最合适

I*****a
发帖数: 5425
29
另外再给说说,以最简单的带block effect 的design 为例,
把block effect 作为 random 的和 fixed 的,各是用的什么assumption,是不是真的
是要看“观察数据的时候是可以控制的还是不可以”?

【在 c****t 的大作中提到】
: 呵呵看来您不知道自己说反了。random effects之所以要用不同的设定是因为所用的
: predictor表现特别;而不是因为不同的coefficient设定才把一个predictor变成了
: random effect
: 比如说楼主决定用income作predictor,如果一个intercept,一个slope就可以算出不错
: 的prediction,那么fixed effect model就搞定。需要做random effect model最简单(
: 但不是最常见)的情况:不同income有不同的intercepts(假定slope还都一样)。比如
: 0-50k intercept 1000, 50k-100k intercept 1, 100k+ intercept 10。这样的
: relationship不是linear,linear model可以做但predicition不好。而用smoother也许
: 能提高prediction但不make sense。这时用random effect model效果最好。
: 为深嘛这predictor这么特别。原因是income其实不是最合适的predictor,只是最合适

c****u
发帖数: 243
30
:sample中有人来自同一行业,或相近地区,造成了natural grouping。
终于搜到了random effect的定义,可以用来佐证他人的结论了,
孺子可教啊,不过搜是搜到了,理解不理解就不一定了,

:fixed effects就是说你在严格控制的实验条件下观测了一批数据,而且你认为它 :
们都
:是符合某种条件的random variables; random effects就是说你测数据时没法严 :
格控制
:,所以观测结果受某个或某些没控制的random variable(s)影响了。
从这段来看,什么是effect,什么是predictor,估计还是一团浆糊,继续搜索
:把categorical variable叫作dummy variable,不懂latent variable,把random
:error 叫做measurement error都是特定的某类人嘿嘿
看看,通过搜索,知道了这些统计的基本概念,是不是马上就感觉高大上了?
不过以后最好在吹之前搜一下,减少making “don't mislead louzhu” 的comments
Keep searching and Happy searching.

【在 c****t 的大作中提到】
: 呵呵看来您不知道自己说反了。random effects之所以要用不同的设定是因为所用的
: predictor表现特别;而不是因为不同的coefficient设定才把一个predictor变成了
: random effect
: 比如说楼主决定用income作predictor,如果一个intercept,一个slope就可以算出不错
: 的prediction,那么fixed effect model就搞定。需要做random effect model最简单(
: 但不是最常见)的情况:不同income有不同的intercepts(假定slope还都一样)。比如
: 0-50k intercept 1000, 50k-100k intercept 1, 100k+ intercept 10。这样的
: relationship不是linear,linear model可以做但predicition不好。而用smoother也许
: 能提高prediction但不make sense。这时用random effect model效果最好。
: 为深嘛这predictor这么特别。原因是income其实不是最合适的predictor,只是最合适

相关主题
请问谁能给解释一下 fix effect 和 random effect 的区别?SAS-GLM random effects questions
求教 nlme in Rmixed effects model 请教
mixed linear model 里面fixed effect 和 random effect[Help] SAS Proc mixed
进入Statistics版参与讨论
c****t
发帖数: 19049
31
这话本来想省下的: wikipedia的主要用途是查查电影电视,小说漫画,演员歌手什么
的。一般这些信息都挺准确,也不用看底下的reference

【在 I*****a 的大作中提到】
: 另外再给说说,以最简单的带block effect 的design 为例,
: 把block effect 作为 random 的和 fixed 的,各是用的什么assumption,是不是真的
: 是要看“观察数据的时候是可以控制的还是不可以”?

c****t
发帖数: 19049
32
呵呵您自认学霸觉得命运不公没关系,但公开撸就不对了

【在 c****u 的大作中提到】
: :sample中有人来自同一行业,或相近地区,造成了natural grouping。
: 终于搜到了random effect的定义,可以用来佐证他人的结论了,
: 孺子可教啊,不过搜是搜到了,理解不理解就不一定了,
:
: :fixed effects就是说你在严格控制的实验条件下观测了一批数据,而且你认为它 :
: 们都
: :是符合某种条件的random variables; random effects就是说你测数据时没法严 :
: 格控制
: :,所以观测结果受某个或某些没控制的random variable(s)影响了。
: 从这段来看,什么是effect,什么是predictor,估计还是一团浆糊,继续搜索

I*****a
发帖数: 5425
33
竟整那些没用的干啥?展开说说是正道

【在 c****t 的大作中提到】
: 这话本来想省下的: wikipedia的主要用途是查查电影电视,小说漫画,演员歌手什么
: 的。一般这些信息都挺准确,也不用看底下的reference

j********2
发帖数: 5
34
做了两年generalized linear mixed model的人飘过~~~
beta是parameter,不是任何factor/effect。
random effect指的是某个X。
natural grouping确实是核心概念之一,还有另外一点就是我们并不在乎random
effect的意义,我们并不interpret它。
fixed model跟random model实际上就是variance-covariance structure不同。
其实只要看formula就能明白的。fixed effect在formula里面不是随机的,而random
effect在formula里面是random的,服从某个分布的,通常这个分布是normal(0,
sigma)。

【在 c****u 的大作中提到】
: :sample中有人来自同一行业,或相近地区,造成了natural grouping。
: 终于搜到了random effect的定义,可以用来佐证他人的结论了,
: 孺子可教啊,不过搜是搜到了,理解不理解就不一定了,
:
: :fixed effects就是说你在严格控制的实验条件下观测了一批数据,而且你认为它 :
: 们都
: :是符合某种条件的random variables; random effects就是说你测数据时没法严 :
: 格控制
: :,所以观测结果受某个或某些没控制的random variable(s)影响了。
: 从这段来看,什么是effect,什么是predictor,估计还是一团浆糊,继续搜索

m***a
发帖数: 1175
35
正解 是variance-covariance structure不同

【在 j********2 的大作中提到】
: 做了两年generalized linear mixed model的人飘过~~~
: beta是parameter,不是任何factor/effect。
: random effect指的是某个X。
: natural grouping确实是核心概念之一,还有另外一点就是我们并不在乎random
: effect的意义,我们并不interpret它。
: fixed model跟random model实际上就是variance-covariance structure不同。
: 其实只要看formula就能明白的。fixed effect在formula里面不是随机的,而random
: effect在formula里面是random的,服从某个分布的,通常这个分布是normal(0,
: sigma)。

I*****a
发帖数: 5425
36
你的意思是,某 X 是 normal(0, sigma),而不是某beta 。

【在 j********2 的大作中提到】
: 做了两年generalized linear mixed model的人飘过~~~
: beta是parameter,不是任何factor/effect。
: random effect指的是某个X。
: natural grouping确实是核心概念之一,还有另外一点就是我们并不在乎random
: effect的意义,我们并不interpret它。
: fixed model跟random model实际上就是variance-covariance structure不同。
: 其实只要看formula就能明白的。fixed effect在formula里面不是随机的,而random
: effect在formula里面是random的,服从某个分布的,通常这个分布是normal(0,
: sigma)。

N******n
发帖数: 3003
37
主要是为了likelihood求解的时候,有不同的假设。比如,covariance 的假设可能的
情况。

【在 j********2 的大作中提到】
: 做了两年generalized linear mixed model的人飘过~~~
: beta是parameter,不是任何factor/effect。
: random effect指的是某个X。
: natural grouping确实是核心概念之一,还有另外一点就是我们并不在乎random
: effect的意义,我们并不interpret它。
: fixed model跟random model实际上就是variance-covariance structure不同。
: 其实只要看formula就能明白的。fixed effect在formula里面不是随机的,而random
: effect在formula里面是random的,服从某个分布的,通常这个分布是normal(0,
: sigma)。

s*r
发帖数: 2757
38
其实教科书上说到fixed random 都是在anova里面引入的,而anova的经典表示方法是y
=u+b+e. y=u+Bx+e是general linear model的写法,这里x就是dummy variable 的
design matrix了。
在anova里理解fix/random effect要容易. b是random effect with p level的话,对
应的B, 在effect coding下,就是一个p-1的vector. 这个vector的每一个element都是
从一个normal distribution里面出来;x总是fixed,因为它代表每个subject的effect
属于哪个level.
I*****a
发帖数: 5425
39
说的就是啊。
就算不是anona,在一般的linear model里面也不至于把X理解成random 的吧。

是y
effect

【在 s*r 的大作中提到】
: 其实教科书上说到fixed random 都是在anova里面引入的,而anova的经典表示方法是y
: =u+b+e. y=u+Bx+e是general linear model的写法,这里x就是dummy variable 的
: design matrix了。
: 在anova里理解fix/random effect要容易. b是random effect with p level的话,对
: 应的B, 在effect coding下,就是一个p-1的vector. 这个vector的每一个element都是
: 从一个normal distribution里面出来;x总是fixed,因为它代表每个subject的effect
: 属于哪个level.

c****0
发帖数: 14490
40
这个才是正确答案吧,有印象...

【在 c********h 的大作中提到】
: 如果一个factor的levels是fixed,比如gender,只有male和female,一般就
: incoporate as fixed effect
: 如果一个factor的levels只是对应于某个实验或者observational study,比如说
: batches,subjects,换了别的实验就不是这些levels了,那么一般用random effect
: 如果一个model have both fixed effects and random effects,那么就是mixed
: effect model

1 (共1页)
进入Statistics版参与讨论
相关主题
a quesiton about random effect为什么fixed effect没有变化?
Use random effect model on panel data?谁能说说如何区分fixed effect, random effects
请问谁能给解释一下 fix effect 和 random effect 的区别?R lme random effect output, waiting online for response
求教 nlme in R外行请教:这个问题有没有答案?
mixed linear model 里面fixed effect 和 random effectRandom and repeated in mixed model
SAS-GLM random effects questionsGEE and Random effect model
mixed effects model 请教【请教】Stata中random effects的standard error
[Help] SAS Proc mixedkabam 面经
相关话题的讨论汇总
话题: random话题: effect话题: fixed话题: model话题: effects