Hi all,
I'm attempting to estimate the size (Cohen's f-squared) of a fixed effect in a crossed-random-effects model using meglm. Per the guidance here, after running the full model containing all effects, I tried to run a reduced model omitting the effect whose size I'd like to estimate -- while constraining the random intercepts to be the same as in the full model. The problem that I'm running into is that, while I can constrain the second random intercept in the reduced model, I can't seem to constrain the first one. Here's what I see:
Full model:
meglm prejudice group_ideo status choice age gender r_* education income if ideo < 0 || _all: R.group || caseid:, coeflegend
...
----------------------------------------------------------------------------------
prejudice | Coef. Legend
-----------------+----------------------------------------------------------------
group_ideo | .3505744 _b[group_ideo]
status | -.0520157 _b[status]
choice | .0785236 _b[choice]
age | -.0174924 _b[age]
gender | -.0317336 _b[gender]
r_black | -.0153226 _b[r_black]
r_latino | -.0161411 _b[r_latino]
r_asian | -.0213594 _b[r_asian]
r_other | -.0020795 _b[r_other]
education | .1457378 _b[education]
income | -.0353673 _b[income]
_cons | .3821728 _b[_cons]
-----------------+----------------------------------------------------------------
_all>group |
var(_cons)| .0095322 _b[/var(_cons[_all>group])]
-----------------+----------------------------------------------------------------
caseid |
var(_cons)| .0173583 _b[/var(_cons[caseid])]
-----------------+----------------------------------------------------------------
var(e.prejudice)| .036905 _b[/var(e.prejudice)]
----------------------------------------------------------------------------------
Setting constraints:
constraint 1 _b[/var(_cons[_all>group])] = .0095322
constraint 2 _b[/var(_cons[caseid])] = .0173583
Reduced model (omitting group_ideo, whose effect size I'm estimating):
meglm prejudice status choice age gender r_* education income if ideo < 0 || _all: R.group || caseid:, constraints(1 2) coeflegend
...
( 1) [/]var(_cons[caseid]) = .0173583 [Here's the second constraint; where is the first?]
----------------------------------------------------------------------------------
prejudice | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-----------------+----------------------------------------------------------------
status | -.0240033 .0394749 -0.61 0.543 -.1013727 .0533661
choice | .1014771 .0279125 3.64 0.000 .0467697 .1561845
age | -.0154582 .0553281 -0.28 0.780 -.1238992 .0929828
gender | -.018527 .0250571 -0.74 0.460 -.067638 .030584
r_black | -.0374703 .0388945 -0.96 0.335 -.113702 .0387614
r_latino | -.0198336 .0677155 -0.29 0.770 -.1525536 .1128864
r_asian | -.0256533 .0624194 -0.41 0.681 -.147993 .0966864
r_other | -.0046783 .0693498 -0.07 0.946 -.1406015 .1312449
education | .1304237 .0716898 1.82 0.069 -.0100858 .2709331
income | -.0426562 .0493371 -0.86 0.387 -.1393551 .0540428
_cons | .3906323 .0350027 11.16 0.000 .3220283 .4592362
-----------------+----------------------------------------------------------------
_all>group |
var(_cons)| .0231686 .0072097 .0125897 .0426365
-----------------+----------------------------------------------------------------
caseid |
var(_cons)| .0173583 (constrained)
-----------------+----------------------------------------------------------------
var(e.prejudice)| .0405366 .0022036 .0364397 .045094
----------------------------------------------------------------------------------
So the caseid intercept is successfully constrained in the reduced model, but the _all>group intercept is freely estimated for some reason. Does anyone have any insights into why I get this behavior? Note that I'm pulling the parameter name for the first intercept, _b[/var(_cons[_all>group])], directly from the output of the first model.
Thanks in advance for any help!
Eric
I'm attempting to estimate the size (Cohen's f-squared) of a fixed effect in a crossed-random-effects model using meglm. Per the guidance here, after running the full model containing all effects, I tried to run a reduced model omitting the effect whose size I'd like to estimate -- while constraining the random intercepts to be the same as in the full model. The problem that I'm running into is that, while I can constrain the second random intercept in the reduced model, I can't seem to constrain the first one. Here's what I see:
Full model:
meglm prejudice group_ideo status choice age gender r_* education income if ideo < 0 || _all: R.group || caseid:, coeflegend
...
----------------------------------------------------------------------------------
prejudice | Coef. Legend
-----------------+----------------------------------------------------------------
group_ideo | .3505744 _b[group_ideo]
status | -.0520157 _b[status]
choice | .0785236 _b[choice]
age | -.0174924 _b[age]
gender | -.0317336 _b[gender]
r_black | -.0153226 _b[r_black]
r_latino | -.0161411 _b[r_latino]
r_asian | -.0213594 _b[r_asian]
r_other | -.0020795 _b[r_other]
education | .1457378 _b[education]
income | -.0353673 _b[income]
_cons | .3821728 _b[_cons]
-----------------+----------------------------------------------------------------
_all>group |
var(_cons)| .0095322 _b[/var(_cons[_all>group])]
-----------------+----------------------------------------------------------------
caseid |
var(_cons)| .0173583 _b[/var(_cons[caseid])]
-----------------+----------------------------------------------------------------
var(e.prejudice)| .036905 _b[/var(e.prejudice)]
----------------------------------------------------------------------------------
Setting constraints:
constraint 1 _b[/var(_cons[_all>group])] = .0095322
constraint 2 _b[/var(_cons[caseid])] = .0173583
Reduced model (omitting group_ideo, whose effect size I'm estimating):
meglm prejudice status choice age gender r_* education income if ideo < 0 || _all: R.group || caseid:, constraints(1 2) coeflegend
...
( 1) [/]var(_cons[caseid]) = .0173583 [Here's the second constraint; where is the first?]
----------------------------------------------------------------------------------
prejudice | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-----------------+----------------------------------------------------------------
status | -.0240033 .0394749 -0.61 0.543 -.1013727 .0533661
choice | .1014771 .0279125 3.64 0.000 .0467697 .1561845
age | -.0154582 .0553281 -0.28 0.780 -.1238992 .0929828
gender | -.018527 .0250571 -0.74 0.460 -.067638 .030584
r_black | -.0374703 .0388945 -0.96 0.335 -.113702 .0387614
r_latino | -.0198336 .0677155 -0.29 0.770 -.1525536 .1128864
r_asian | -.0256533 .0624194 -0.41 0.681 -.147993 .0966864
r_other | -.0046783 .0693498 -0.07 0.946 -.1406015 .1312449
education | .1304237 .0716898 1.82 0.069 -.0100858 .2709331
income | -.0426562 .0493371 -0.86 0.387 -.1393551 .0540428
_cons | .3906323 .0350027 11.16 0.000 .3220283 .4592362
-----------------+----------------------------------------------------------------
_all>group |
var(_cons)| .0231686 .0072097 .0125897 .0426365
-----------------+----------------------------------------------------------------
caseid |
var(_cons)| .0173583 (constrained)
-----------------+----------------------------------------------------------------
var(e.prejudice)| .0405366 .0022036 .0364397 .045094
----------------------------------------------------------------------------------
So the caseid intercept is successfully constrained in the reduced model, but the _all>group intercept is freely estimated for some reason. Does anyone have any insights into why I get this behavior? Note that I'm pulling the parameter name for the first intercept, _b[/var(_cons[_all>group])], directly from the output of the first model.
Thanks in advance for any help!
Eric
Comment