Announcement

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

  • STATA can't handle TOEPLITZ 1 (MDEPENDENT(1)) and AR(1) when bootstrapping mixed models

    TOEPLITZ 1 (MDEPENDENT(1))

    bootstrap, reps(20) seed(1) saving(mdep1test): mixed Pain i.RANDOM W W2 W1 RANDOM#c.W1#c.W, || ID:, noconstant residuals(toeplitz 1, t(t))
    (running mixed on estimation sample)

    Bootstrap replications (20)
    ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5
    xxxxxxxxxxxxxxxxxxxx
    insufficient observations to compute bootstrap standard errors
    no results will be saved
    r(2000);

    AR(1)

    bootstrap, reps(20) seed(1) saving(ar1test): mixed Pain i.RANDOM W W2 W1 RANDOM#c.W1#c.W, || ID:, noconstant residuals(ar 1, t(t))
    (running mixed on estimation sample)

    Bootstrap replications (20)
    ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5
    xxxxxxxxxxxxxxxxxxxx
    insufficient observations to compute bootstrap standard errors
    no results will be saved
    r(2000);

    EXCHANGEABLE

    bootstrap, reps(20) seed(1) saving(exchtest): mixed Pain i.RANDOM W W2 W1 RANDOM#c.W1#c.W, || ID:, noconstant residuals(exch, t(t))
    (running mixed on estimation sample)

    Bootstrap replications (20)
    ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5
    ....................

    Mixed-effects ML regression Number of obs = 3,224
    Group variable: ID Number of groups = 62

    Obs per group:
    min = 40
    avg = 51.2
    max = 52

    Wald chi2(6) = 1619.72
    Log likelihood = -5665.6279 Prob > chi2 = 0.0000

    .
    .
    .

    INDEPENDENT

    bootstrap, reps(20) seed(1) saving(indeptest): mixed Pain i.RANDOM W W2 W1 RANDOM#c.W1#c.W, || ID:, noconstant residuals(indep, t(t))
    (running mixed on estimation sample)

    Bootstrap replications (20)
    ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5
    ....................

    Mixed-effects ML regression Number of obs = 3,224

    Wald chi2(6) = 1291.49
    Log likelihood = -6253.7152 Prob > chi2 = 0.0000

    .
    .
    .

    The same problem occurs if you try to use a fixed toeplitz 1 correlation matrix.


    .
    .
    .

  • #2
    The problem is solved by Andrea Discacciati; use cluster and group.
    I.e. bootstrap, reps(20) seed(1) cluster(ID) id(ID_New) group(ID) saving(mdep1test): mixed Pain i.RANDOM W W2 W1 RANDOM#c.W1#c.W, || ID:, noconstant residuals(toeplitz 1, t(t))

    Comment

    Working...
    X