question about fixed and random effects
question about fixed and random effects
Dear Tom
I have a sample of 5000 households’ expenditures on a commodity (x) for 10 years (1991 to 2000). At first I calcify those households into 10 income levels (or deciles) and then I sum their expenditures on the commodity for each year. Therefore I have a panel sample of ten cross sections and 10 years (10 observations for each year and 100 total observations). And at year 6 (i.e., 1996) a policy change has occurred in the country which could have affected the consumption behavior of households.
Now I want to estimate the following panel model:
c(i,t)=a(i)+b*M(t)
In which, c(i,t) is expenditure of cross i in year t on the commodity and M is total expenditures of cross i in year t.
The question is which model is more appropriate: fixed effect or random effect? And one-way or two-way error model?
I have some information about fixed and random effect but I am not sure how to choose appropriate model intuitively. For example I am not sure is a RE two-way error or RE mixed effect (fixed cross effects and random time effects) correct or not intuitively. I think there are time-specific effects because of policy change but I am not sure it is fixed or random.
I would be grateful if you could possibly guide me.
I have a sample of 5000 households’ expenditures on a commodity (x) for 10 years (1991 to 2000). At first I calcify those households into 10 income levels (or deciles) and then I sum their expenditures on the commodity for each year. Therefore I have a panel sample of ten cross sections and 10 years (10 observations for each year and 100 total observations). And at year 6 (i.e., 1996) a policy change has occurred in the country which could have affected the consumption behavior of households.
Now I want to estimate the following panel model:
c(i,t)=a(i)+b*M(t)
In which, c(i,t) is expenditure of cross i in year t on the commodity and M is total expenditures of cross i in year t.
The question is which model is more appropriate: fixed effect or random effect? And one-way or two-way error model?
I have some information about fixed and random effect but I am not sure how to choose appropriate model intuitively. For example I am not sure is a RE two-way error or RE mixed effect (fixed cross effects and random time effects) correct or not intuitively. I think there are time-specific effects because of policy change but I am not sure it is fixed or random.
I would be grateful if you could possibly guide me.
Last edited by jack on Tue Sep 03, 2019 4:31 pm, edited 1 time in total.
Re: question about fixed and random effects
I assume you meant (from the description) M(i,t).
That sounds like fixed effects would be proper. The difference between the two is that random effects assumes the individual effect is uncorrelated with the regressor M, while fixed effects makes no such assumption.
Adding time effects means that you think there is an unmodeled common change in consumption over time (in some way). It sounds like what you really want is a one-off change at the intervention point, either with an intercept change, a slope change or both. If you incorporate time effects, you would be unable to estimate an dummy variable intercept change.
That sounds like fixed effects would be proper. The difference between the two is that random effects assumes the individual effect is uncorrelated with the regressor M, while fixed effects makes no such assumption.
Adding time effects means that you think there is an unmodeled common change in consumption over time (in some way). It sounds like what you really want is a one-off change at the intervention point, either with an intercept change, a slope change or both. If you incorporate time effects, you would be unable to estimate an dummy variable intercept change.
Re: question about fixed and random effects
Thanks a lot for your guidance.
Since my sample (5000 households) is a small part of the population and I am interested in the population itself , therefore I thought RE model may be more appropriate.
Consumption expenditures are rising because of inflation and c(i,t) and M(i,t) are both nominal variables so they are some how increasing each year. And the policy change has increased the inflation from 2005 onwards.
So, is it a good reason to add times effect? (or just use a time dummy for 2005 onwards?).
.That sounds like fixed effects would be proper
Since my sample (5000 households) is a small part of the population and I am interested in the population itself , therefore I thought RE model may be more appropriate.
.Adding time effects means that you think there is an unmodeled common change in consumption over time (in some way)
Consumption expenditures are rising because of inflation and c(i,t) and M(i,t) are both nominal variables so they are some how increasing each year. And the policy change has increased the inflation from 2005 onwards.
So, is it a good reason to add times effect? (or just use a time dummy for 2005 onwards?).
Re: question about fixed and random effects
No. I have no idea where you got that idea.jack wrote:Thanks a lot for your guidance.
.That sounds like fixed effects would be proper
Since my sample (5000 households) is a small part of the population and I am interested in the population itself , therefore I thought RE model may be more appropriate.
Why are you not deflating the expenditure variables? That makes more sense than adding time effects. Note that the individual effects are assumed to be constant over time, which certainly would not be the case if the data are increasing with inflation.jack wrote:.Adding time effects means that you think there is an unmodeled common change in consumption over time (in some way)
Consumption expenditures are rising because of inflation and c(i,t) and M(i,t) are both nominal variables so they are some how increasing each year. And the policy change has increased the inflation from 2005 onwards.
So, is it a good reason to add times effect? (or just use a time dummy for 2005 onwards?).
Re: question about fixed and random effects
Why?Note that the individual effects are assumed to be constant over time, which certainly would not be the case if the data are increasing with inflation.
Is it ok to use deflated expenditure variables in following system?

where p(1,t)*x(1,t) is consumption expenditures on x(1) in year t, m(t) total expenditures and p(1) the price of x(1) and so on.
Re: question about fixed and random effects
Why what?jack wrote:Why?Note that the individual effects are assumed to be constant over time, which certainly would not be the case if the data are increasing with inflation.
If you divide both by a general price level p(t), aren't all the decisions the same?jack wrote: Is it ok to use deflated expenditure variables in following system?
where p(1,t)*x(1,t) is consumption expenditures on x(1) in year t, m(t) total expenditures and p(1) the price of x(1) and so on.
Re: question about fixed and random effects
Thanks a lot for your kind replies.
If I use real or deflated data, so shouldn't I include time effects (period effects) in the model? Do I need just a dummy variable for policy change?
And the last question. Based on your advice it seems that the appropriate model is a fixed effects model. why? Is it because the individual effect is probably correlated with the regressor M? And, what if the results of Hausman test show that the appropriate model is a random effect model (for both cross and time effects)?
I am really sorry for asking too many equations.
Why the assumption that fixed effect are constant over time will be violated if the data are increasing with inflation?Why what?
If I use real or deflated data, so shouldn't I include time effects (period effects) in the model? Do I need just a dummy variable for policy change?
And the last question. Based on your advice it seems that the appropriate model is a fixed effects model. why? Is it because the individual effect is probably correlated with the regressor M? And, what if the results of Hausman test show that the appropriate model is a random effect model (for both cross and time effects)?
I am really sorry for asking too many equations.
Re: question about fixed and random effects
Think about it. An individual effect is fixed over time. How could that possibly work with nominal expenditures going up with inflation?jack wrote:Thanks a lot for your kind replies.
Why the assumption that fixed effect are constant over time will be violated if the data are increasing with inflation?Why what?
If you use deflated data, you're getting rid of an obvious difference between time periods. That doesn't mean that time effects might not be present but they are definitely present if you use nominal data.jack wrote: If I use real or deflated data, so shouldn't I include time effects (period effects) in the model? Do I need just a dummy variable for policy change?
Fixed effects is never really wrong, unless you have an interest in a coefficient on a time invariant regressor. A Hausman test will never show the "appropriate" model is RE; it can just reject RE.jack wrote: And the last question. Based on your advice it seems that the appropriate model is a fixed effects model. why? Is it because the individual effect is probably correlated with the regressor M? And, what if the results of Hausman test show that the appropriate model is a random effect model (for both cross and time effects)?
Is your base model actually intended to be used with panel data? It looks more like it's a cross section model.
Re: question about fixed and random effects
Dear Tom
As you said before here https://estima.com/forum/viewtopic.php? ... 284#p16890 my goal is to estimate a LES as follows:
.
I tried to write a program based on consumer.rpf but I couldn't get appropriate results.
Now, I want to estimate
and get estimated a(i)'s from it and then substitute them in LES and finally estimate LES with SUR.
Here is my data (nominal data). I don't know how to justify that FE is a proper model and I don't know if I still need to include time effects or a time dummy variable even with deflated data.

As you said before here https://estima.com/forum/viewtopic.php? ... 284#p16890 my goal is to estimate a LES as follows:
.I tried to write a program based on consumer.rpf but I couldn't get appropriate results.
Now, I want to estimate
and get estimated a(i)'s from it and then substitute them in LES and finally estimate LES with SUR.Here is my data (nominal data). I don't know how to justify that FE is a proper model and I don't know if I still need to include time effects or a time dummy variable even with deflated data.
I still didn't get the pointThink about it. An individual effect is fixed over time. How could that possibly work with nominal expenditures going up with inflation?
Re: question about fixed and random effects
Was your original model designed to be estimated with panel data, or was it designed to be estimated with cross section data? You can't just take a cross section model and replace i subscripts with i,t and have a sensible panel data model, as the original model may not be designed to handle things that change with time.
Think about it. An individual effect is fixed over time. How could that possibly work with nominal expenditures going up with inflation?
An individual effect is a individual-specific shift up or down from what a model predicts. If you do the model in nominal expenditures, that means something like +$40. If the prices triple, do you really think the person would still be just +$40?jack wrote:I still didn't get the point
Re: question about fixed and random effects
Dear Tom,
The results for random and fixed effect are very different. Here is the results for regression of real c1(cc) on real m(mm). I do not know how to choose the proper model. As you can see the coefficients of mm are different.
The results for random and fixed effect are very different. Here is the results for regression of real c1(cc) on real m(mm). I do not know how to choose the proper model. As you can see the coefficients of mm are different.
Panel Regression - Estimation by Random Effects
Dependent Variable CC
Panel(10) of Annual Data From 1//1981:01 To 10//1990:01
Usable Observations 100
Degrees of Freedom 98
Mean of Dependent Variable 202660.97274
Std Error of Dependent Variable 80192.83543
Standard Error of Estimate 17291.53222
Sum of Squared Residuals 29301714490
Log Likelihood -1134.4761
S.D. (eta_it) 18137.1435
S.D. (mu_i) 0.0000
S.D. (lambda_t) 18767.0717
Hausman Test(1) 0.316016
Significance Level 0.5740119
Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. Constant 19930.876270 7774.031387 2.56378 0.01035403
2. MM 0.200246 0.005131 39.02414 0.00000000
Panel Regression - Estimation by Fixed Effects
Dependent Variable CC
Panel(10) of Annual Data From 1//1981:01 To 10//1990:01
Usable Observations 100
Degrees of Freedom 89
Centered R^2 0.9306315
R-Bar^2 0.9228373
Uncentered R^2 0.9906902
Mean of Dependent Variable 202660.97274
Std Error of Dependent Variable 80192.83543
Standard Error of Estimate 22276.10952
Sum of Squared Residuals 44164029908
Regression F(10,89) 119.4003
Significance Level of F 0.0000000
Log Likelihood -1137.1942
Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. Constant 0.0000000000 0.0000000000 0.00000 0.00000000
2. MM 0.1393393002 0.0084459733 16.49772 0.00000000Re: question about fixed and random effects
Your RE is doing EFFECTS=BOTH and your FE isn't.
Re: question about fixed and random effects
Dear Tom,
Here are the results of three models.
I do not know how to choose between them.
Hasuman test cannot reject the RE.
Results of model one and two and three are very similar.
Under the the policy change the subsidies on energy and food prices has been replaced with monthly cash payments to households ( from year 6 onwards).
So, I am really grateful if you could possibly guide me to choose the proper model.
Model 1:
PREG(METHOD=RANDOM,EFFECTS=BOTH) CC
# Constant MM
PREG(METHOD=FIXED,EFFECTS=TIME) CC
# Constant MM
PREG(METHOD=FIXED,EFFECTS=BOTH) CC
# Constant MM
Model 4:
PREG(method=fixed) CC
# Constant MM
Here are the results of three models.
I do not know how to choose between them.
Hasuman test cannot reject the RE.
Results of model one and two and three are very similar.
Under the the policy change the subsidies on energy and food prices has been replaced with monthly cash payments to households ( from year 6 onwards).
So, I am really grateful if you could possibly guide me to choose the proper model.
Model 1:
PREG(METHOD=RANDOM,EFFECTS=BOTH) CC
# Constant MM
Panel Regression - Estimation by Random Effects
Dependent Variable CC
Panel(10) of Annual Data From 1//1981:01 To 10//1990:01
Usable Observations 100
Degrees of Freedom 98
Mean of Dependent Variable 202660.97274
Std Error of Dependent Variable 80192.83543
Standard Error of Estimate 17291.53222
Sum of Squared Residuals 29301714490
Log Likelihood -1134.4761
S.D. (eta_it) 18137.1435
S.D. (mu_i) 0.0000
S.D. (lambda_t) 18767.0717
Hausman Test(1) 0.316016
Significance Level 0.5740119
Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. Constant 19930.876270 7774.031387 2.56378 0.01035403
2. MM 0.200246 0.005131 39.02414 0.00000000
Model 2:PREG(METHOD=FIXED,EFFECTS=TIME) CC
# Constant MM
Panel Regression - Estimation by Fixed Effects
Dependent Variable CC
Panel(10) of Annual Data From 1//1981:01 To 10//1990:01
Usable Observations 100
Degrees of Freedom 89
Centered R^2 0.9546383
R-Bar^2 0.9495415
Uncentered R^2 0.9939121
Mean of Dependent Variable 202660.97274
Std Error of Dependent Variable 80192.83543
Standard Error of Estimate 18013.69101
Sum of Squared Residuals 28879882673
Regression F(10,89) 187.3009
Significance Level of F 0.0000000
Log Likelihood -1115.9559
Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. Constant 0.0000000000 0.0000000000 0.00000 0.00000000
2. MM 0.2031902648 0.0052015146 39.06367 0.00000000
model 3: PREG(METHOD=FIXED,EFFECTS=BOTH) CC
# Constant MM
Panel Regression - Estimation by Fixed Effects
Dependent Variable CC
Panel(10) of Annual Data From 1//1981:01 To 10//1990:01
Usable Observations 100
Degrees of Freedom 80
Centered R^2 0.9586647
R-Bar^2 0.9488475
Uncentered R^2 0.9944525
Mean of Dependent Variable 202660.97274
Std Error of Dependent Variable 80192.83543
Standard Error of Estimate 18137.14354
Sum of Squared Residuals 26316478051
Regression F(19,80) 97.6521
Significance Level of F 0.0000000
Log Likelihood -1111.3084
Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. Constant 0.0000000000 0.0000000000 0.00000 0.00000000
2. MM 0.1909839721 0.0172557848 11.06782 0.00000000
Model 4:
PREG(method=fixed) CC
# Constant MM
anel Regression - Estimation by Fixed Effects
Dependent Variable CC
Panel(10) of Annual Data From 1//1981:01 To 10//1990:01
Usable Observations 100
Degrees of Freedom 89
Centered R^2 0.9306315
R-Bar^2 0.9228373
Uncentered R^2 0.9906902
Mean of Dependent Variable 202660.97274
Std Error of Dependent Variable 80192.83543
Standard Error of Estimate 22276.10952
Sum of Squared Residuals 44164029908
Regression F(10,89) 119.4003
Significance Level of F 0.0000000
Log Likelihood -1137.1942
Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. Constant 0.0000000000 0.0000000000 0.00000 0.00000000
2. MM 0.1393393002 0.0084459733 16.49772 0.00000000Re: question about fixed and random effects
There's no indication that you have individual effects; just time effects. RE and FE with just EFFECTS=TiME look like they should give fairly similar results.
Re: question about fixed and random effects
Thanks a lot.
And, why R-Bar^2 is so high in those panel models? Is it a sign of spurious regression?
And, why R-Bar^2 is so high in those panel models? Is it a sign of spurious regression?