Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Jackknife, multiple imputation and weight in a multilevel model

    Dear all

    A colleague and I are trying to run a multilevel fixed effects model, that has to be weighted. The model estimates effects on scores on a math test, and observations are sampled in clusters of schools. The data is collected across three countries. We run a model for each country separately. We have been using both State 15.1 and 14.2. We want to compute jackknife standard errors and perform multiple imputation simultaneously. However this does not seem to be possible. Our syntax looks like this:

    Code:
    mi estimate: jackknife: mixed ASMMAT01 male age socioeco || IDSCHOOL: , pweight(HOUWGTt), if IDcountry==i
    This results in the following error message:

    Code:
    command prefix jackknife: not allowed
    r(198);
    Is there any way around this?

    Furthermore we've attempted to run the model with multiple imputation but without jackknife - using the following syntax

    Code:
    mi estimate: mixed ASMMAT01 male age socioeco || IDSCHOOL:: , pweight(HOUWGT), if IDcountry==i
    However this does not allow for using the if qualifier. Returning errors like these:

    Code:
    if not allowed
    r(101);
    and without the comma:

    Code:
    mi estimate: mixed ASMMAT01 male age socioeco || IDSCHOOL: , pweight(HOUWGT) if IDcountry==i
    Code:
    option if not allowed
    an error occurred when mi estimate executed mixed on m=1
    r(198);

    When taking out the "if" part of the syntax like this:

    Code:
    mi estimate: mixed ASMMAT01 male age socioeco || IDSCHOOL: , pweight(HOUWGT)
    it returns the following error:

    Code:
    weights not constant within groups defined by IDCLASS
    an error occurred when mi estimate executed mixed on m=1
    r(459);
    Now my question is basically: Is it not possible to run a multiple imputation on a model where you also use jackknife? and is it not possible to run multiple imputation on a model where you apply weights?

    Thank you for any help.

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input double(ASMMAT01 male age) byte socioeco double(IDCNTRY IDSCHOOL HOUWGT)
     537.1483 1 11.416666666666666 3 208 2  .7805405573470268
    569.22101 1 10.833333333333334 2 208 2  .7805405573470268
    555.97787 0 10.916666666666666 4 208 2  .7805405573470268
    580.33195 1 11.166666666666666 3 208 2  .7805405573470268
    605.72645 1              11.25 3 208 2  .7805405573470268
    597.64762 0 10.666666666666666 5 208 2  .7805405573470268
    625.70285 1 10.416666666666666 3 208 2  .7805405573470268
    558.85991 1 10.583333333333334 2 208 2  .7805405573470268
    603.06901 1 10.666666666666666 3 208 2  .7805405573470268
    588.85443 0 10.333333333333334 2 208 2  .7805405573470268
    588.62757 0 10.916666666666666 3 208 2  .7805405573470268
    554.48994 0 11.083333333333334 4 208 2  .7805405573470268
    627.80202 1 10.916666666666666 2 208 2  .7805405573470268
     644.4944 0 10.833333333333334 4 208 2  .7805405573470268
    622.85722 0              10.75 5 208 2  .7805405573470268
    581.43155 1 10.833333333333334 5 208 2  .7805405573470268
    568.71713 0                 11 5 208 2  .7805405573470268
     553.4946 1 11.166666666666666 3 208 2  .7805405573470268
    505.97307 1                 11 5 208 2  .7805405573470268
    465.53041 0 10.916666666666666 2 208 6  .8738411851509466
    504.20182 1              11.25 3 208 6  .8738411851509466
    634.59512 1 10.916666666666666 2 208 6  .8738411851509466
    481.75222 0 10.916666666666666 3 208 6  .8738411851509466
    472.37649 0 10.666666666666666 3 208 6  .8738411851509466
    485.79709 0 11.333333333333334 3 208 6  .8738411851509466
    569.33816 1              11.25 . 208 6  .8738411851509466
     543.5862 1 11.333333333333334 2 208 6  .8738411851509466
    638.60593 0 10.416666666666666 4 208 6  .8738411851509466
    540.26577 0 11.083333333333334 3 208 6  .8738411851509466
    536.32271 0 11.166666666666666 . 208 6  .8738411851509466
    581.58681 1 10.416666666666666 2 208 6  .8738411851509466
    488.92604 0 10.666666666666666 3 208 6  .8738411851509466
    581.24326 1 10.916666666666666 3 208 6  .8738411851509466
    601.57215 1                 11 3 208 6  .8738411851509466
    571.20999 1 11.333333333333334 2 208 6  .8738411851509466
    591.46633 0 10.583333333333334 3 208 6  .8738411851509466
    573.24292 0 10.583333333333334 4 208 6  .8738411851509466
    603.61759 1 10.666666666666666 3 208 6  .8738411851509466
    597.56313 0 11.083333333333334 3 208 6  .8738411851509466
    544.07323 1 10.833333333333334 5 208 6  .8738411851509466
    445.16831 1                 11 3 208 8  .7971477385227967
    585.25144 0 10.333333333333334 2 208 8  .7971477385227967
    498.00481 0 11.083333333333334 3 208 8  .7971477385227967
    591.35708 1                 11 5 208 8  .7971477385227967
    552.91648 1 10.416666666666666 3 208 8  .7971477385227967
    614.49687 1 10.833333333333334 3 208 8  .7971477385227967
    611.19535 0 10.666666666666666 4 208 8  .7971477385227967
    600.75154 1 11.166666666666666 4 208 8  .7971477385227967
    530.77693 1                 11 4 208 8  .7971477385227967
    417.90725 1 11.083333333333334 4 208 8  .7971477385227967
    543.87751 0 11.416666666666666 4 208 8  .7971477385227967
    589.58913 1 10.916666666666666 3 208 8  .7971477385227967
    490.28835 1 10.583333333333334 1 208 8  .7971477385227967
    656.84928 1 10.833333333333334 3 208 8  .7971477385227967
    627.18287 1 11.583333333333334 3 208 8  .7971477385227967
    529.41772 1                 10 4 208 8  .7971477385227967
    540.55153 0 10.916666666666666 2 208 8  .7971477385227967
    603.56837 0 10.833333333333334 2 208 8  .7971477385227967
    619.63841 1 11.333333333333334 3 208 8  .7971477385227967
    574.93004 1                 11 3 208 8  .7971477385227967
    580.56051 0 10.583333333333334 4 208 8  .7971477385227967
    638.36354 0 11.333333333333334 5 208 8  .7971477385227967
    591.09013 0 10.666666666666666 3 208 8  .7971477385227967
    554.57783 1 10.916666666666666 4 208 8  .7971477385227967
    446.10907 0 10.083333333333334 2 578 1 1.2933739165841749
     377.4309 1               9.75 5 578 1 1.2933739165841749
    353.48115 1               9.75 1 578 1 1.2933739165841749
    370.67478 1                9.5 2 578 1 1.2933739165841749
    334.89133 1  9.833333333333334 2 578 1 1.2933739165841749
     436.4567 0  9.333333333333334 2 578 1 1.2933739165841749
    469.29007 0  9.583333333333334 5 578 1 1.2933739165841749
    453.10966 0  9.416666666666666 3 578 1 1.2933739165841749
    526.48402 0               9.75 4 578 1 1.2933739165841749
    445.85436 0  9.416666666666666 3 578 1  .7834861225461828
     516.6046 0  9.916666666666666 3 578 1  .7834861225461828
    434.78406 1               9.25 4 578 1  .7834861225461828
    501.24996 1               9.75 2 578 1  .7834861225461828
    546.73932 1               9.25 5 578 1  .7834861225461828
    416.51963 0 10.166666666666666 4 578 1  .7834861225461828
    478.67945 1               9.25 3 578 1  .7834861225461828
    435.66621 0  9.333333333333334 3 578 1  .7834861225461828
    338.95869 0               9.75 2 578 1  .7834861225461828
     345.4473 0               9.75 3 578 1  .7834861225461828
    360.52116 1 10.083333333333334 1 578 1  .7834861225461828
    395.57894 1 10.083333333333334 1 578 1  .7834861225461828
    344.39927 0  9.583333333333334 1 578 1  .7834861225461828
    416.11464 0               9.75 2 578 2 1.2026397414052175
    497.38369 1 10.166666666666666 2 578 2 1.2026397414052175
    367.35275 1                9.5 3 578 2 1.2026397414052175
    438.83157 1               9.75 3 578 2 1.2026397414052175
     508.5095 1  9.583333333333334 5 578 2 1.2026397414052175
    576.47104 0  9.416666666666666 3 578 2 1.2026397414052175
    315.65508 1  9.416666666666666 1 578 2 1.2026397414052175
    513.09523 0               9.75 3 578 2 1.2026397414052175
    449.11843 1 10.083333333333334 5 578 2 1.2026397414052175
    472.75099 0               9.75 4 578 2 1.2026397414052175
    381.39767 0                 10 1 578 2 1.2026397414052175
    562.19379 1               9.75 3 578 2 1.2026397414052175
    460.97912 0  9.583333333333334 2 578 2 1.2026397414052175
    492.30829 0               9.25 3 578 2 1.2026397414052175
    end
    label values male male
    label def male 0 "Female", modify
    label def male 1 "Male", modify
    label values age ASDAGE
    label values socioeco ASBG04
    label def ASBG04 1 "NONE OR FEW (0-10)", modify
    label def ASBG04 2 "ONE SHELF (11-25)", modify
    label def ASBG04 3 "ONE BOOKCASE (26-100)", modify
    label def ASBG04 4 "TWO BOOKCASES (101-200)", modify
    label def ASBG04 5 "THREE ORE MORE BOOKCASES (200+)", modify
    label values HOUWGT HOUWGT
Working...
X