Hi,
I ran a svy: glm model and now i am trying to estimate the margins. As you know since I am using svyset data file and svy: glm model, the margins command should be vce(unconditional) if the estimation model is linearized. now my questions is:
1. i have got the margins once with vce(unconditional) and once without as shown below and the margins are the same though the CI are different. So would it be ok if i don't specify vce(unconditional)
2. I also tried to get the margins for a continuous variable with vce(unconditional) and it did not work but when i did not specify vce(unconditional) it worked with the default delta method. So why is that? and is it ok then to drop the vce(unconditional)?
I would appreciate any positive response soon.
Thx
Amira
I ran a svy: glm model and now i am trying to estimate the margins. As you know since I am using svyset data file and svy: glm model, the margins command should be vce(unconditional) if the estimation model is linearized. now my questions is:
1. i have got the margins once with vce(unconditional) and once without as shown below and the margins are the same though the CI are different. So would it be ok if i don't specify vce(unconditional)
Code:
. margins W1ethgrpYP, vce(unconditional) Predictive margins Number of obs = 1664 Expression : Predicted mean KS4_PTSTNEWG, predict() ------------------------------------------------------------------------------ | Linearized | Margin Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- W1ethgrpYP | 1 | 396.4839 6.955229 57.01 0.000 382.7473 410.2204 2 | 440.4226 24.78977 17.77 0.000 391.4629 489.3823 3 | 479.1828 47.64378 10.06 0.000 385.0865 573.2791 4 | 428.8674 36.8949 11.62 0.000 356.0001 501.7347 5 | 436.0725 45.21273 9.64 0.000 346.7775 525.3675 6 | 440.0247 39.66395 11.09 0.000 361.6886 518.3609 7 | 474.1615 27.91923 16.98 0.000 419.0211 529.3019 8 | 445.8941 49.03087 9.09 0.000 349.0583 542.7299 ------------------------------------------------------------------------------ . margins W1ethgrpYP Predictive margins Number of obs = 1664 Model VCE : Linearized Expression : Predicted mean KS4_PTSTNEWG, predict() ------------------------------------------------------------------------------ | Delta-method | Margin Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- W1ethgrpYP | 1 | 396.4839 4.771013 83.10 0.000 387.1329 405.8349 2 | 440.4226 25.2624 17.43 0.000 390.9092 489.936 3 | 479.1828 47.93554 10.00 0.000 385.2309 573.1347 4 | 428.8674 36.97941 11.60 0.000 356.3891 501.3457 5 | 436.0725 45.59635 9.56 0.000 346.7053 525.4397 6 | 440.0247 40.32042 10.91 0.000 360.9982 519.0513 7 | 474.1615 28.99045 16.36 0.000 417.3413 530.9817 8 | 445.8941 48.61035 9.17 0.000 350.6196 541.1686 ------------------------------------------------------------------------------
Code:
. margins at((p25) KS4_CVAP3APS_Z ) at((p50) KS4_CVAP3APS_Z ) at((p75) KS4_CVAP3APS_Z ) , vce(unconditional) variable at not found r(111); . margins, at((p25) KS4_CVAP3APS_Z) at((p50) KS4_CVAP3APS_Z) at((p75) KS4_CVAP3APS_Z) Predictive margins Number of obs = 1664 Model VCE : Linearized Expression : Predicted mean KS4_PTSTNEWG, predict() 1._at : KS4_CVAP3A~Z = -.1484548 (p25) 2._at : KS4_CVAP3A~Z = .4140617 (p50) 3._at : KS4_CVAP3A~Z = .9943422 (p75) ------------------------------------------------------------------------------ | Delta-method | Margin Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- _at | 1 | 324.7706 6.300149 51.55 0.000 312.4226 337.1187 2 | 389.7903 4.170021 93.47 0.000 381.6173 397.9634 3 | 470.531 6.681251 70.43 0.000 457.436 483.626 ------------------------------------------------------------------------------
Thx
Amira
Comment