Hello,
I am running a two-part model for a large sample survey data. After defining the svysetelements (see below), I ran the twopmprocedure with defined subpopulation which produced estimable outcomes. However, while running the next step of the margins command, almost all covariates were not estimable.
Can you identify an issue with the code or suggest a better method of defining the svyset elements?
Also, the margins command takes an awfully long time (2 full days!). What could be the reason?
CODE:
svyset hosp_nrd [pweight=discwt], strata(nrd_stratum) vce(linearized) singleunit(missing)
pweight: discwt
VCE: linearized
Single unit: missing
Strata 1: nrd_stratum
SU 1: hosp_nrd
FPC 1: <zero>
svy, subpop(indexevent_ard): twopm readmitcost_2 i.female i.agecat i.patloc i.pay1 i.zipinc_qrtl i.tot_unrel_comor i.hcup_ed2 i.h_contrl i.hosp_urcat4 i.hosp_ur_teach i.dmonth los, firstpart(logit) secondpart(glm, family(gamma) link(log))
margins, dydx(*) atmeans
OUTPUT:
---------------------------------------------------------------------------------
| Delta-method
| dy/dx Std. Err. z P>|z| [95% Conf. Interval]
----------------+----------------------------------------------------------------
1.female | . (not estimable)
|
agecat |
3 | . (not estimable)
4 | . (not estimable)
5 | . (not estimable)
|
patloc |
2 | . (not estimable)
3 | . (not estimable)
|
pay1 |
2 | . (not estimable)
3 | . (not estimable)
4 | . (not estimable)
5 | . (not estimable)
6 | . (not estimable)
7 | . (not estimable)
|
zipinc_qrtl |
2 | . (not estimable)
3 | . (not estimable)
4 | . (not estimable)
5 | . (not estimable)
|
tot_unrel_comor |
1 | . (not estimable)
2 | . (not estimable)
3 | . (not estimable)
4 | . (not estimable)
|
1.hcup_ed2 | . (not estimable)
|
h_contrl |
2 | . (not estimable)
3 | . (not estimable)
|
hosp_urcat4 |
2 | . (not estimable)
3 | . (not estimable)
4 | . (not estimable)
|
dmonth |
2 | -128.4357 59.65185 -2.15 0.031 -245.3512 -11.52025
3 | -184.5084 59.66988 -3.09 0.002 -301.4593 -67.55761
4 | -129.2712 67.57373 -1.91 0.056 -261.7133 3.170888
5 | -86.47192 66.31225 -1.30 0.192 -216.4415 43.49769
6 | -58.55037 63.64463 -0.92 0.358 -183.2916 66.19082
7 | 28.21226 60.41113 0.47 0.640 -90.19138 146.6159
8 | -24.72032 62.83588 -0.39 0.694 -147.8764 98.43575
9 | -141.1451 64.69266 -2.18 0.029 -267.9404 -14.34986
10 | -231.7357 56.86605 -4.08 0.000 -343.1911 -120.2803
11 | -391.36 63.8644 -6.13 0.000 -516.5319 -266.1881
|
los | . (not estimable)
---------------------------------------------------------------------------------
Note: dy/dx for factor levels is the discrete change from the base level.
.
I am running a two-part model for a large sample survey data. After defining the svysetelements (see below), I ran the twopmprocedure with defined subpopulation which produced estimable outcomes. However, while running the next step of the margins command, almost all covariates were not estimable.
Can you identify an issue with the code or suggest a better method of defining the svyset elements?
Also, the margins command takes an awfully long time (2 full days!). What could be the reason?
CODE:
svyset hosp_nrd [pweight=discwt], strata(nrd_stratum) vce(linearized) singleunit(missing)
pweight: discwt
VCE: linearized
Single unit: missing
Strata 1: nrd_stratum
SU 1: hosp_nrd
FPC 1: <zero>
svy, subpop(indexevent_ard): twopm readmitcost_2 i.female i.agecat i.patloc i.pay1 i.zipinc_qrtl i.tot_unrel_comor i.hcup_ed2 i.h_contrl i.hosp_urcat4 i.hosp_ur_teach i.dmonth los, firstpart(logit) secondpart(glm, family(gamma) link(log))
margins, dydx(*) atmeans
OUTPUT:
---------------------------------------------------------------------------------
| Delta-method
| dy/dx Std. Err. z P>|z| [95% Conf. Interval]
----------------+----------------------------------------------------------------
1.female | . (not estimable)
|
agecat |
3 | . (not estimable)
4 | . (not estimable)
5 | . (not estimable)
|
patloc |
2 | . (not estimable)
3 | . (not estimable)
|
pay1 |
2 | . (not estimable)
3 | . (not estimable)
4 | . (not estimable)
5 | . (not estimable)
6 | . (not estimable)
7 | . (not estimable)
|
zipinc_qrtl |
2 | . (not estimable)
3 | . (not estimable)
4 | . (not estimable)
5 | . (not estimable)
|
tot_unrel_comor |
1 | . (not estimable)
2 | . (not estimable)
3 | . (not estimable)
4 | . (not estimable)
|
1.hcup_ed2 | . (not estimable)
|
h_contrl |
2 | . (not estimable)
3 | . (not estimable)
|
hosp_urcat4 |
2 | . (not estimable)
3 | . (not estimable)
4 | . (not estimable)
|
dmonth |
2 | -128.4357 59.65185 -2.15 0.031 -245.3512 -11.52025
3 | -184.5084 59.66988 -3.09 0.002 -301.4593 -67.55761
4 | -129.2712 67.57373 -1.91 0.056 -261.7133 3.170888
5 | -86.47192 66.31225 -1.30 0.192 -216.4415 43.49769
6 | -58.55037 63.64463 -0.92 0.358 -183.2916 66.19082
7 | 28.21226 60.41113 0.47 0.640 -90.19138 146.6159
8 | -24.72032 62.83588 -0.39 0.694 -147.8764 98.43575
9 | -141.1451 64.69266 -2.18 0.029 -267.9404 -14.34986
10 | -231.7357 56.86605 -4.08 0.000 -343.1911 -120.2803
11 | -391.36 63.8644 -6.13 0.000 -516.5319 -266.1881
|
los | . (not estimable)
---------------------------------------------------------------------------------
Note: dy/dx for factor levels is the discrete change from the base level.
.
Comment