Mixed Effects Model: Writing Out Level 1/Level 2 Models
up vote
3
down vote
favorite
Suppose I have an LMER output (using Grunfeld data from plm package) as:
summary(lmer(inv ~ value + capital + (1|firm), data = Grunfeld))
> Random effects:
Groups Name Variance Std.Dev. Corr
firm (Intercept) 7367 85.83
Residual 2781 52.74 0.831
Number of obs: 200, groups: firm, 10
Fixed effects:
Estimate Std. Error t value
(Intercept) -57.86442 29.37776 -1.97
value 0.10979 0.01053 10.43
capital 0.30819 0.01717 17.95
Correlation of Fixed Effects:
(Intr) value
value -0.328
capital -0.019 -0.368
I know we can write a Level 1/Level 2 model based on this as:
Level 1:
y = alpha_0 + alpha_1 * value + alpha_2 * capital + eps
Level 2:
alpha_0 = gamma_00 + u_0
alpha_1 = gamma_01 + u_1
alpha_2 = gamma_02 + u_2
The level 1 model should have alpha_0=-57.864, alpha_1=0.109, alpha_2=0.308.
Now, I'm actually not sure if this is the correct form of the level 2 model. Im wondering what exactly the level 1/2 models would be here (for example, are the gammas in the level 2 model concrete values, or are they RV's. For example, here, it is not clear what those values are supposed to be). And also what the correlation of the fixed effects means versus the correlation of random effects. I can't seem to find definitive answers online.
mixed-model
New contributor
add a comment |
up vote
3
down vote
favorite
Suppose I have an LMER output (using Grunfeld data from plm package) as:
summary(lmer(inv ~ value + capital + (1|firm), data = Grunfeld))
> Random effects:
Groups Name Variance Std.Dev. Corr
firm (Intercept) 7367 85.83
Residual 2781 52.74 0.831
Number of obs: 200, groups: firm, 10
Fixed effects:
Estimate Std. Error t value
(Intercept) -57.86442 29.37776 -1.97
value 0.10979 0.01053 10.43
capital 0.30819 0.01717 17.95
Correlation of Fixed Effects:
(Intr) value
value -0.328
capital -0.019 -0.368
I know we can write a Level 1/Level 2 model based on this as:
Level 1:
y = alpha_0 + alpha_1 * value + alpha_2 * capital + eps
Level 2:
alpha_0 = gamma_00 + u_0
alpha_1 = gamma_01 + u_1
alpha_2 = gamma_02 + u_2
The level 1 model should have alpha_0=-57.864, alpha_1=0.109, alpha_2=0.308.
Now, I'm actually not sure if this is the correct form of the level 2 model. Im wondering what exactly the level 1/2 models would be here (for example, are the gammas in the level 2 model concrete values, or are they RV's. For example, here, it is not clear what those values are supposed to be). And also what the correlation of the fixed effects means versus the correlation of random effects. I can't seem to find definitive answers online.
mixed-model
New contributor
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
Suppose I have an LMER output (using Grunfeld data from plm package) as:
summary(lmer(inv ~ value + capital + (1|firm), data = Grunfeld))
> Random effects:
Groups Name Variance Std.Dev. Corr
firm (Intercept) 7367 85.83
Residual 2781 52.74 0.831
Number of obs: 200, groups: firm, 10
Fixed effects:
Estimate Std. Error t value
(Intercept) -57.86442 29.37776 -1.97
value 0.10979 0.01053 10.43
capital 0.30819 0.01717 17.95
Correlation of Fixed Effects:
(Intr) value
value -0.328
capital -0.019 -0.368
I know we can write a Level 1/Level 2 model based on this as:
Level 1:
y = alpha_0 + alpha_1 * value + alpha_2 * capital + eps
Level 2:
alpha_0 = gamma_00 + u_0
alpha_1 = gamma_01 + u_1
alpha_2 = gamma_02 + u_2
The level 1 model should have alpha_0=-57.864, alpha_1=0.109, alpha_2=0.308.
Now, I'm actually not sure if this is the correct form of the level 2 model. Im wondering what exactly the level 1/2 models would be here (for example, are the gammas in the level 2 model concrete values, or are they RV's. For example, here, it is not clear what those values are supposed to be). And also what the correlation of the fixed effects means versus the correlation of random effects. I can't seem to find definitive answers online.
mixed-model
New contributor
Suppose I have an LMER output (using Grunfeld data from plm package) as:
summary(lmer(inv ~ value + capital + (1|firm), data = Grunfeld))
> Random effects:
Groups Name Variance Std.Dev. Corr
firm (Intercept) 7367 85.83
Residual 2781 52.74 0.831
Number of obs: 200, groups: firm, 10
Fixed effects:
Estimate Std. Error t value
(Intercept) -57.86442 29.37776 -1.97
value 0.10979 0.01053 10.43
capital 0.30819 0.01717 17.95
Correlation of Fixed Effects:
(Intr) value
value -0.328
capital -0.019 -0.368
I know we can write a Level 1/Level 2 model based on this as:
Level 1:
y = alpha_0 + alpha_1 * value + alpha_2 * capital + eps
Level 2:
alpha_0 = gamma_00 + u_0
alpha_1 = gamma_01 + u_1
alpha_2 = gamma_02 + u_2
The level 1 model should have alpha_0=-57.864, alpha_1=0.109, alpha_2=0.308.
Now, I'm actually not sure if this is the correct form of the level 2 model. Im wondering what exactly the level 1/2 models would be here (for example, are the gammas in the level 2 model concrete values, or are they RV's. For example, here, it is not clear what those values are supposed to be). And also what the correlation of the fixed effects means versus the correlation of random effects. I can't seem to find definitive answers online.
mixed-model
mixed-model
New contributor
New contributor
edited 2 days ago
New contributor
asked 2 days ago
user3000877
184
184
New contributor
New contributor
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
2
down vote
accepted
Note that you have only included a random intercept for the firm
grouping variable. I.e., the model you are fitting is the following:
$$left{
begin{array}{l}
texttt{Inv}_{ij} = beta_0 + beta_1 texttt{Value}_{ij} + beta_2 texttt{Capital}_{ij} + b_i + varepsilon_{ij},\\
b_i sim mathcal N(0, sigma_b^2), quad varepsilon_{ij} sim mathcal N(0, sigma^2),
end{array}
right.$$
where $texttt{Inv}_{ij}$ denotes the $j$-th measurement within the $i$-th firm for you outcome variable, and likewise $texttt{Value}_{ij}$ and $texttt{Capital}_{ij}$ denote the $j$-th measurement within the $i$-th firm for the two predictors.
The estimated parameters according to the output are:
- $hatbeta_0 = -57.86442$
- $hatbeta_1 = 0.10979$
- $hatbeta_2 = 0.30819$
- $hatsigma_b = 85.83$
- $hatsigma = 52.74$
You could also rewrite the same model as:
$$left{
begin{array}{l}
texttt{Inv}_{ij} = alpha_{0i} + beta_1 texttt{Value}_{ij} + beta_2 texttt{Capital}_{ij} + varepsilon_{ij},\\
alpha_{0i} = beta_0 + b_i,\\
b_i sim mathcal N(0, sigma_b^2), quad varepsilon_{ij} sim mathcal N(0, sigma^2).
end{array}
right.$$
Thank you! This is great. I have also been trying to understand what the correlation of random effects exactly represents. For example, I understand the correlation of fixed effects measures the correlation between coefficients for each of the individual fits. But what does the correlation of random effects show?
– user3000877
2 days ago
It is not clear which correlation you exactly mean. You only have a single random intercept per firm. BTW, when I run the same example in my laptop, I don't get theCorr
column in the Random Effects output.
– Dimitris Rizopoulos
2 days ago
My apologies, you are correct. Suppose I run this code: summary(lmer(inv ~ value + capital + (1+value|firm), data = Grunfeld)). We see the correlation of random effects is -0.40. What does this term represent, exactly? The correlation of fixed effects measures the correlation between the coefficients for individual fits (which can be confirmed with, say, looking at LmList) but I cannot see what the -0.40 correlation for random effects corresponds to.
– user3000877
2 days ago
This is the (prior) correlation between the random intercepts and random slopes forvalue
. Because it is negative it indicates that a-priori firms which have a positive intercept will tend to have a negative slope, and the otherway around.
– Dimitris Rizopoulos
yesterday
Thats what I thought, but if I do the following: x=lmer(inv ~ value + capital + (1+value|firm), data = Grunfeld), then: cor(ranef(x)$firm[,1], ranef(x)$firm[,2]), I get a value of -0.3, not -0.4, which does not make sense to me... where exactly would we see what the -0.4 is measuring?
– user3000877
yesterday
|
show 1 more comment
up vote
1
down vote
It seems there are 10 firms in the dataset.
Level 1 model:
$$Y_{ki}=alpha_{0k} + alpha_1X_{1ki} + alpha_2X_{2ki} + epsilon_{ki}$$
So the level 2 model can be written as:
$$alpha_{0k} = alpha_0 + u_k$$
where $k=,...,10$ is index for firm. $i$ is the i-th measurement. $X_{1ki}$ is value and $X_{2ki}$ capital.
$u_ksim N(0,sigma_u^2)$ and $epsilon sim N(0,sigma^2)$.
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
Note that you have only included a random intercept for the firm
grouping variable. I.e., the model you are fitting is the following:
$$left{
begin{array}{l}
texttt{Inv}_{ij} = beta_0 + beta_1 texttt{Value}_{ij} + beta_2 texttt{Capital}_{ij} + b_i + varepsilon_{ij},\\
b_i sim mathcal N(0, sigma_b^2), quad varepsilon_{ij} sim mathcal N(0, sigma^2),
end{array}
right.$$
where $texttt{Inv}_{ij}$ denotes the $j$-th measurement within the $i$-th firm for you outcome variable, and likewise $texttt{Value}_{ij}$ and $texttt{Capital}_{ij}$ denote the $j$-th measurement within the $i$-th firm for the two predictors.
The estimated parameters according to the output are:
- $hatbeta_0 = -57.86442$
- $hatbeta_1 = 0.10979$
- $hatbeta_2 = 0.30819$
- $hatsigma_b = 85.83$
- $hatsigma = 52.74$
You could also rewrite the same model as:
$$left{
begin{array}{l}
texttt{Inv}_{ij} = alpha_{0i} + beta_1 texttt{Value}_{ij} + beta_2 texttt{Capital}_{ij} + varepsilon_{ij},\\
alpha_{0i} = beta_0 + b_i,\\
b_i sim mathcal N(0, sigma_b^2), quad varepsilon_{ij} sim mathcal N(0, sigma^2).
end{array}
right.$$
Thank you! This is great. I have also been trying to understand what the correlation of random effects exactly represents. For example, I understand the correlation of fixed effects measures the correlation between coefficients for each of the individual fits. But what does the correlation of random effects show?
– user3000877
2 days ago
It is not clear which correlation you exactly mean. You only have a single random intercept per firm. BTW, when I run the same example in my laptop, I don't get theCorr
column in the Random Effects output.
– Dimitris Rizopoulos
2 days ago
My apologies, you are correct. Suppose I run this code: summary(lmer(inv ~ value + capital + (1+value|firm), data = Grunfeld)). We see the correlation of random effects is -0.40. What does this term represent, exactly? The correlation of fixed effects measures the correlation between the coefficients for individual fits (which can be confirmed with, say, looking at LmList) but I cannot see what the -0.40 correlation for random effects corresponds to.
– user3000877
2 days ago
This is the (prior) correlation between the random intercepts and random slopes forvalue
. Because it is negative it indicates that a-priori firms which have a positive intercept will tend to have a negative slope, and the otherway around.
– Dimitris Rizopoulos
yesterday
Thats what I thought, but if I do the following: x=lmer(inv ~ value + capital + (1+value|firm), data = Grunfeld), then: cor(ranef(x)$firm[,1], ranef(x)$firm[,2]), I get a value of -0.3, not -0.4, which does not make sense to me... where exactly would we see what the -0.4 is measuring?
– user3000877
yesterday
|
show 1 more comment
up vote
2
down vote
accepted
Note that you have only included a random intercept for the firm
grouping variable. I.e., the model you are fitting is the following:
$$left{
begin{array}{l}
texttt{Inv}_{ij} = beta_0 + beta_1 texttt{Value}_{ij} + beta_2 texttt{Capital}_{ij} + b_i + varepsilon_{ij},\\
b_i sim mathcal N(0, sigma_b^2), quad varepsilon_{ij} sim mathcal N(0, sigma^2),
end{array}
right.$$
where $texttt{Inv}_{ij}$ denotes the $j$-th measurement within the $i$-th firm for you outcome variable, and likewise $texttt{Value}_{ij}$ and $texttt{Capital}_{ij}$ denote the $j$-th measurement within the $i$-th firm for the two predictors.
The estimated parameters according to the output are:
- $hatbeta_0 = -57.86442$
- $hatbeta_1 = 0.10979$
- $hatbeta_2 = 0.30819$
- $hatsigma_b = 85.83$
- $hatsigma = 52.74$
You could also rewrite the same model as:
$$left{
begin{array}{l}
texttt{Inv}_{ij} = alpha_{0i} + beta_1 texttt{Value}_{ij} + beta_2 texttt{Capital}_{ij} + varepsilon_{ij},\\
alpha_{0i} = beta_0 + b_i,\\
b_i sim mathcal N(0, sigma_b^2), quad varepsilon_{ij} sim mathcal N(0, sigma^2).
end{array}
right.$$
Thank you! This is great. I have also been trying to understand what the correlation of random effects exactly represents. For example, I understand the correlation of fixed effects measures the correlation between coefficients for each of the individual fits. But what does the correlation of random effects show?
– user3000877
2 days ago
It is not clear which correlation you exactly mean. You only have a single random intercept per firm. BTW, when I run the same example in my laptop, I don't get theCorr
column in the Random Effects output.
– Dimitris Rizopoulos
2 days ago
My apologies, you are correct. Suppose I run this code: summary(lmer(inv ~ value + capital + (1+value|firm), data = Grunfeld)). We see the correlation of random effects is -0.40. What does this term represent, exactly? The correlation of fixed effects measures the correlation between the coefficients for individual fits (which can be confirmed with, say, looking at LmList) but I cannot see what the -0.40 correlation for random effects corresponds to.
– user3000877
2 days ago
This is the (prior) correlation between the random intercepts and random slopes forvalue
. Because it is negative it indicates that a-priori firms which have a positive intercept will tend to have a negative slope, and the otherway around.
– Dimitris Rizopoulos
yesterday
Thats what I thought, but if I do the following: x=lmer(inv ~ value + capital + (1+value|firm), data = Grunfeld), then: cor(ranef(x)$firm[,1], ranef(x)$firm[,2]), I get a value of -0.3, not -0.4, which does not make sense to me... where exactly would we see what the -0.4 is measuring?
– user3000877
yesterday
|
show 1 more comment
up vote
2
down vote
accepted
up vote
2
down vote
accepted
Note that you have only included a random intercept for the firm
grouping variable. I.e., the model you are fitting is the following:
$$left{
begin{array}{l}
texttt{Inv}_{ij} = beta_0 + beta_1 texttt{Value}_{ij} + beta_2 texttt{Capital}_{ij} + b_i + varepsilon_{ij},\\
b_i sim mathcal N(0, sigma_b^2), quad varepsilon_{ij} sim mathcal N(0, sigma^2),
end{array}
right.$$
where $texttt{Inv}_{ij}$ denotes the $j$-th measurement within the $i$-th firm for you outcome variable, and likewise $texttt{Value}_{ij}$ and $texttt{Capital}_{ij}$ denote the $j$-th measurement within the $i$-th firm for the two predictors.
The estimated parameters according to the output are:
- $hatbeta_0 = -57.86442$
- $hatbeta_1 = 0.10979$
- $hatbeta_2 = 0.30819$
- $hatsigma_b = 85.83$
- $hatsigma = 52.74$
You could also rewrite the same model as:
$$left{
begin{array}{l}
texttt{Inv}_{ij} = alpha_{0i} + beta_1 texttt{Value}_{ij} + beta_2 texttt{Capital}_{ij} + varepsilon_{ij},\\
alpha_{0i} = beta_0 + b_i,\\
b_i sim mathcal N(0, sigma_b^2), quad varepsilon_{ij} sim mathcal N(0, sigma^2).
end{array}
right.$$
Note that you have only included a random intercept for the firm
grouping variable. I.e., the model you are fitting is the following:
$$left{
begin{array}{l}
texttt{Inv}_{ij} = beta_0 + beta_1 texttt{Value}_{ij} + beta_2 texttt{Capital}_{ij} + b_i + varepsilon_{ij},\\
b_i sim mathcal N(0, sigma_b^2), quad varepsilon_{ij} sim mathcal N(0, sigma^2),
end{array}
right.$$
where $texttt{Inv}_{ij}$ denotes the $j$-th measurement within the $i$-th firm for you outcome variable, and likewise $texttt{Value}_{ij}$ and $texttt{Capital}_{ij}$ denote the $j$-th measurement within the $i$-th firm for the two predictors.
The estimated parameters according to the output are:
- $hatbeta_0 = -57.86442$
- $hatbeta_1 = 0.10979$
- $hatbeta_2 = 0.30819$
- $hatsigma_b = 85.83$
- $hatsigma = 52.74$
You could also rewrite the same model as:
$$left{
begin{array}{l}
texttt{Inv}_{ij} = alpha_{0i} + beta_1 texttt{Value}_{ij} + beta_2 texttt{Capital}_{ij} + varepsilon_{ij},\\
alpha_{0i} = beta_0 + b_i,\\
b_i sim mathcal N(0, sigma_b^2), quad varepsilon_{ij} sim mathcal N(0, sigma^2).
end{array}
right.$$
edited yesterday
answered 2 days ago
Dimitris Rizopoulos
4,2801217
4,2801217
Thank you! This is great. I have also been trying to understand what the correlation of random effects exactly represents. For example, I understand the correlation of fixed effects measures the correlation between coefficients for each of the individual fits. But what does the correlation of random effects show?
– user3000877
2 days ago
It is not clear which correlation you exactly mean. You only have a single random intercept per firm. BTW, when I run the same example in my laptop, I don't get theCorr
column in the Random Effects output.
– Dimitris Rizopoulos
2 days ago
My apologies, you are correct. Suppose I run this code: summary(lmer(inv ~ value + capital + (1+value|firm), data = Grunfeld)). We see the correlation of random effects is -0.40. What does this term represent, exactly? The correlation of fixed effects measures the correlation between the coefficients for individual fits (which can be confirmed with, say, looking at LmList) but I cannot see what the -0.40 correlation for random effects corresponds to.
– user3000877
2 days ago
This is the (prior) correlation between the random intercepts and random slopes forvalue
. Because it is negative it indicates that a-priori firms which have a positive intercept will tend to have a negative slope, and the otherway around.
– Dimitris Rizopoulos
yesterday
Thats what I thought, but if I do the following: x=lmer(inv ~ value + capital + (1+value|firm), data = Grunfeld), then: cor(ranef(x)$firm[,1], ranef(x)$firm[,2]), I get a value of -0.3, not -0.4, which does not make sense to me... where exactly would we see what the -0.4 is measuring?
– user3000877
yesterday
|
show 1 more comment
Thank you! This is great. I have also been trying to understand what the correlation of random effects exactly represents. For example, I understand the correlation of fixed effects measures the correlation between coefficients for each of the individual fits. But what does the correlation of random effects show?
– user3000877
2 days ago
It is not clear which correlation you exactly mean. You only have a single random intercept per firm. BTW, when I run the same example in my laptop, I don't get theCorr
column in the Random Effects output.
– Dimitris Rizopoulos
2 days ago
My apologies, you are correct. Suppose I run this code: summary(lmer(inv ~ value + capital + (1+value|firm), data = Grunfeld)). We see the correlation of random effects is -0.40. What does this term represent, exactly? The correlation of fixed effects measures the correlation between the coefficients for individual fits (which can be confirmed with, say, looking at LmList) but I cannot see what the -0.40 correlation for random effects corresponds to.
– user3000877
2 days ago
This is the (prior) correlation between the random intercepts and random slopes forvalue
. Because it is negative it indicates that a-priori firms which have a positive intercept will tend to have a negative slope, and the otherway around.
– Dimitris Rizopoulos
yesterday
Thats what I thought, but if I do the following: x=lmer(inv ~ value + capital + (1+value|firm), data = Grunfeld), then: cor(ranef(x)$firm[,1], ranef(x)$firm[,2]), I get a value of -0.3, not -0.4, which does not make sense to me... where exactly would we see what the -0.4 is measuring?
– user3000877
yesterday
Thank you! This is great. I have also been trying to understand what the correlation of random effects exactly represents. For example, I understand the correlation of fixed effects measures the correlation between coefficients for each of the individual fits. But what does the correlation of random effects show?
– user3000877
2 days ago
Thank you! This is great. I have also been trying to understand what the correlation of random effects exactly represents. For example, I understand the correlation of fixed effects measures the correlation between coefficients for each of the individual fits. But what does the correlation of random effects show?
– user3000877
2 days ago
It is not clear which correlation you exactly mean. You only have a single random intercept per firm. BTW, when I run the same example in my laptop, I don't get the
Corr
column in the Random Effects output.– Dimitris Rizopoulos
2 days ago
It is not clear which correlation you exactly mean. You only have a single random intercept per firm. BTW, when I run the same example in my laptop, I don't get the
Corr
column in the Random Effects output.– Dimitris Rizopoulos
2 days ago
My apologies, you are correct. Suppose I run this code: summary(lmer(inv ~ value + capital + (1+value|firm), data = Grunfeld)). We see the correlation of random effects is -0.40. What does this term represent, exactly? The correlation of fixed effects measures the correlation between the coefficients for individual fits (which can be confirmed with, say, looking at LmList) but I cannot see what the -0.40 correlation for random effects corresponds to.
– user3000877
2 days ago
My apologies, you are correct. Suppose I run this code: summary(lmer(inv ~ value + capital + (1+value|firm), data = Grunfeld)). We see the correlation of random effects is -0.40. What does this term represent, exactly? The correlation of fixed effects measures the correlation between the coefficients for individual fits (which can be confirmed with, say, looking at LmList) but I cannot see what the -0.40 correlation for random effects corresponds to.
– user3000877
2 days ago
This is the (prior) correlation between the random intercepts and random slopes for
value
. Because it is negative it indicates that a-priori firms which have a positive intercept will tend to have a negative slope, and the otherway around.– Dimitris Rizopoulos
yesterday
This is the (prior) correlation between the random intercepts and random slopes for
value
. Because it is negative it indicates that a-priori firms which have a positive intercept will tend to have a negative slope, and the otherway around.– Dimitris Rizopoulos
yesterday
Thats what I thought, but if I do the following: x=lmer(inv ~ value + capital + (1+value|firm), data = Grunfeld), then: cor(ranef(x)$firm[,1], ranef(x)$firm[,2]), I get a value of -0.3, not -0.4, which does not make sense to me... where exactly would we see what the -0.4 is measuring?
– user3000877
yesterday
Thats what I thought, but if I do the following: x=lmer(inv ~ value + capital + (1+value|firm), data = Grunfeld), then: cor(ranef(x)$firm[,1], ranef(x)$firm[,2]), I get a value of -0.3, not -0.4, which does not make sense to me... where exactly would we see what the -0.4 is measuring?
– user3000877
yesterday
|
show 1 more comment
up vote
1
down vote
It seems there are 10 firms in the dataset.
Level 1 model:
$$Y_{ki}=alpha_{0k} + alpha_1X_{1ki} + alpha_2X_{2ki} + epsilon_{ki}$$
So the level 2 model can be written as:
$$alpha_{0k} = alpha_0 + u_k$$
where $k=,...,10$ is index for firm. $i$ is the i-th measurement. $X_{1ki}$ is value and $X_{2ki}$ capital.
$u_ksim N(0,sigma_u^2)$ and $epsilon sim N(0,sigma^2)$.
add a comment |
up vote
1
down vote
It seems there are 10 firms in the dataset.
Level 1 model:
$$Y_{ki}=alpha_{0k} + alpha_1X_{1ki} + alpha_2X_{2ki} + epsilon_{ki}$$
So the level 2 model can be written as:
$$alpha_{0k} = alpha_0 + u_k$$
where $k=,...,10$ is index for firm. $i$ is the i-th measurement. $X_{1ki}$ is value and $X_{2ki}$ capital.
$u_ksim N(0,sigma_u^2)$ and $epsilon sim N(0,sigma^2)$.
add a comment |
up vote
1
down vote
up vote
1
down vote
It seems there are 10 firms in the dataset.
Level 1 model:
$$Y_{ki}=alpha_{0k} + alpha_1X_{1ki} + alpha_2X_{2ki} + epsilon_{ki}$$
So the level 2 model can be written as:
$$alpha_{0k} = alpha_0 + u_k$$
where $k=,...,10$ is index for firm. $i$ is the i-th measurement. $X_{1ki}$ is value and $X_{2ki}$ capital.
$u_ksim N(0,sigma_u^2)$ and $epsilon sim N(0,sigma^2)$.
It seems there are 10 firms in the dataset.
Level 1 model:
$$Y_{ki}=alpha_{0k} + alpha_1X_{1ki} + alpha_2X_{2ki} + epsilon_{ki}$$
So the level 2 model can be written as:
$$alpha_{0k} = alpha_0 + u_k$$
where $k=,...,10$ is index for firm. $i$ is the i-th measurement. $X_{1ki}$ is value and $X_{2ki}$ capital.
$u_ksim N(0,sigma_u^2)$ and $epsilon sim N(0,sigma^2)$.
answered 2 days ago
user158565
4,9051317
4,9051317
add a comment |
add a comment |
user3000877 is a new contributor. Be nice, and check out our Code of Conduct.
user3000877 is a new contributor. Be nice, and check out our Code of Conduct.
user3000877 is a new contributor. Be nice, and check out our Code of Conduct.
user3000877 is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Cross Validated!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstats.stackexchange.com%2fquestions%2f380999%2fmixed-effects-model-writing-out-level-1-level-2-models%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown