Hi all. I'm struggling with getting output when using mimrgns followed by pwcompare for a categorical by continuous interaction. This is my first post. My apologies for any unclear phrasing.
Here is my setup:
misstable patterns participate1 sense1 ruca_3cat walk10rec walk10utility male age_consent safecrime collegeplus white incomeunder50
quietly misstable summarize participate1 sense1 ruca_3cat walk10rec walk10utility male age_consent safecrime collegeplus white incomeunder50, gen(miss_)
describe miss_*
mi set flong
mi register imputed participate1 sense1 walk10rec walk10utility safecrime collegeplus white incomeunder50
mi impute chained (logit) safecrime collegeplus white incomeunder50 (truncreg, ll(1) ul(5)) participate1 sense1 (truncreg, ll(0) ul(6))walk10rec (truncreg, ll(0) ul(12)) walk10utility = i.male i.ruca_3cat age_consent, add(20) rseed(2122) dots
mi svyset [w= weight_saq], psu(psu) strata(strata_final) vce(linearized) singleunit(centered)
I can regress and produce marginsplot graphs following mimrgins used with cmdmargin, but I'm struggling to get pwcompare to produce output.
If I phrase the syntax as follows, Stata runs, but doesn't provide output (and no error message). Below is all that Stata produces:
mimrgns ruca_3cat, dydx(walk10rec) pwcompare(effects)
note: option predict() not specified; predict(xb) assumed
Multiple-imputation estimates
Pairwise comparisons of average marginal effects
Imputations = 20
Number of obs = 1,758
Number of strata = 33 Population size = 4,473,551
Number of PSUs = 73
Average RVI = 0.1895
Largest FMI = 0.1478
Complete DF = 40
DF adjustment: Small sample DF: min = 31.83
avg = 35.36
Within VCE type: Delta-method max = 37.26
Expression : Linear prediction, predict(xb)
dy/dx w.r.t. : walk10rec
I've also tried the following syntax, but I get the subsequent error messages.
. mimrgns ruca_3cat, at(walk10rec=(0(1)6)) pwcompare(effects)
note: option predict() not specified; predict(xb) assumed
_b_stat::fill_groups_wrk_unbal(): 3301 subscript invalid
_b_stat::fill_groups(): - function returned error
_b_stat::compute_groups(): - function returned error
_b_stat::compute(): - function returned error
_coef_table(): - function returned error
<istmt>: - function returned error
an error occurred when mi estimate executed mimrgns_estimate on m=1
This way also failed:
. mimrgns i.ruca_3cat c.walk10rec i.ruca_3cat#c.walk10rec, pwcompare(effects)
note: option predict() not specified; predict(xb) assumed
only factor variables and their interactions are allowed
an error occurred when mi estimate executed mimrgns_estimate on m=1
Any suggestions? Thank you for your time, insight, and patience.
Here is my setup:
misstable patterns participate1 sense1 ruca_3cat walk10rec walk10utility male age_consent safecrime collegeplus white incomeunder50
quietly misstable summarize participate1 sense1 ruca_3cat walk10rec walk10utility male age_consent safecrime collegeplus white incomeunder50, gen(miss_)
describe miss_*
mi set flong
mi register imputed participate1 sense1 walk10rec walk10utility safecrime collegeplus white incomeunder50
mi impute chained (logit) safecrime collegeplus white incomeunder50 (truncreg, ll(1) ul(5)) participate1 sense1 (truncreg, ll(0) ul(6))walk10rec (truncreg, ll(0) ul(12)) walk10utility = i.male i.ruca_3cat age_consent, add(20) rseed(2122) dots
mi svyset [w= weight_saq], psu(psu) strata(strata_final) vce(linearized) singleunit(centered)
I can regress and produce marginsplot graphs following mimrgins used with cmdmargin, but I'm struggling to get pwcompare to produce output.
If I phrase the syntax as follows, Stata runs, but doesn't provide output (and no error message). Below is all that Stata produces:
mimrgns ruca_3cat, dydx(walk10rec) pwcompare(effects)
note: option predict() not specified; predict(xb) assumed
Multiple-imputation estimates
Pairwise comparisons of average marginal effects
Imputations = 20
Number of obs = 1,758
Number of strata = 33 Population size = 4,473,551
Number of PSUs = 73
Average RVI = 0.1895
Largest FMI = 0.1478
Complete DF = 40
DF adjustment: Small sample DF: min = 31.83
avg = 35.36
Within VCE type: Delta-method max = 37.26
Expression : Linear prediction, predict(xb)
dy/dx w.r.t. : walk10rec
I've also tried the following syntax, but I get the subsequent error messages.
. mimrgns ruca_3cat, at(walk10rec=(0(1)6)) pwcompare(effects)
note: option predict() not specified; predict(xb) assumed
_b_stat::fill_groups_wrk_unbal(): 3301 subscript invalid
_b_stat::fill_groups(): - function returned error
_b_stat::compute_groups(): - function returned error
_b_stat::compute(): - function returned error
_coef_table(): - function returned error
<istmt>: - function returned error
an error occurred when mi estimate executed mimrgns_estimate on m=1
This way also failed:
. mimrgns i.ruca_3cat c.walk10rec i.ruca_3cat#c.walk10rec, pwcompare(effects)
note: option predict() not specified; predict(xb) assumed
only factor variables and their interactions are allowed
an error occurred when mi estimate executed mimrgns_estimate on m=1
Any suggestions? Thank you for your time, insight, and patience.

Comment