SPSS Statistics

Expand all | Collapse all

Fitting models with covariance matrices defined by Kronecker products with MIXED

  • 1.  Fitting models with covariance matrices defined by Kronecker products with MIXED

    Posted Wed September 22, 2021 09:11 AM
    Hello,

    I'm trying to replicate the following analysis in SAS PROC MIXED using the SPSS MIXED command. Here is the model being fitted:

    proc mixed data = ratbrain;

    class animal region treatment;

    model activate = region treatment region*treatment / s;

    random int / subject = animal type=vc v vcorr solution;

    repeated region treatment / subject=animal type=un@un r rcorr;

    run;

    There are six measures per animal, defined by three regions and two treatments per region.

    Here is the output from fitting this model in SAS:

    Covariance Parameter Estimates

    --------------------------------------

    Cov Parm Subject Estimate

    --------------------------------------

    Intercept animal 7637.3000

    region UN(1,1) animal 2127.7400

    UN(2,1) animal 1987.2900

    UN(2,2) animal 2744.6600

    UN(3,1) animal 1374.5100

    UN(3,2) animal 2732.2200

    UN(3,3) animal 3419.7000

    treatment UN(1,1) animal 1.0000

    UN(2,1) animal -0.4284

    UN(2,2) animal 0.6740

    I would like to try and fit the same model using MIXED in SPSS. However, I'm having a very hard time figuring out how to do this. Here is what I've tried:

    MIXED
    activate BY region treatment
    /CRITERIA = CIN(95) MXITER(100) MXSTEP(5) SCORING(1)
    SINGULAR(0.000000000001) HCONVERGE(0, ABSOLUTE)
    LCONVERGE(0, ABSOLUTE) PCONVERGE(0.000001, ABSOLUTE)
    DFMETHOD(KENWARDROGER)
    /FIXED = region treatment region*treatment | SSTYPE(3)
    /METHOD = REML
    /PRINT = SOLUTION G
    /RANDOM INTERCEPT | SUBJECT(animal) COVTYPE(UN) SOLUTION
    /repeated region*treatment | subject(animal) kronecker(region treatment) covtype(un_un)
    /SAVE = PRED RESID .

    I get an error message saying that the region and treatment variables cannot be included in both the repeated statement and the kronecker option. I can't remove the repeated variables, and I need to use the kronecker() option if covtype is un_un. I'm at a bit of a loss as to how to fit the same model. When I create a new variable called "measure" with values 1, 2, 3, 4, 5, 6 for each animal, and use that as the repeated variable with the region and treatment variables specified as the kronecker measures, I simply get a convergence error and no output.

    I'd welcome any help on how to fit this model using SPSS MIXED. Thanks in advance!



    ------------------------------
    Brady West
    ------------------------------


  • 2.  RE: Fitting models with covariance matrices defined by Kronecker products with MIXED

    Posted Wed September 22, 2021 10:39 AM
    Good morning. One of our statisticians have responded:


    The issue is caused by the fact that we cannot allow the exact same effect to be specified by both Repeated and Kronecker Measures. Please ask the customer to specify

    /repeated region | subject(animal) kronecker(treatment) covtype(un_un)


    and try again.






  • 3.  RE: Fitting models with covariance matrices defined by Kronecker products with MIXED

    Posted Wed September 22, 2021 10:57 AM
    Another statistician has replied independently:

    "In order to get the syntax to work, one of the two variables listed on KRONECKER needs to be removed. I believe to match what SAS is doing, it would be the second one (treatment). I think the specification on KRONECKER is to specify the factor(s) that define the general ("unstructured") structure in the first part of the Kronecker product."






  • 4.  RE: Fitting models with covariance matrices defined by Kronecker products with MIXED

    Posted Thu September 23, 2021 01:20 AM
    Hi Rick,

    Thanks for the quick replies. This suggestion came close, and produces the same estimates of the fixed effects; however, the standard errors of the estimated fixed effects are pretty different. Compared to SAS, the -2 REML log-likelihood is different (and changing the SPSS MIXED estimation criteria did not change this), and the estimates of the covariance parameters are different. I'm including both sets of output below. I'd welcome any suggestions for trying to get these to match up more closely.

    -Brady

    SAS Output:

    Fit Statistics
    -2 Res Log Likelihood 240.0
    AIC (Smaller is Better) 258.0
    AICC (Smaller is Better) 270.9
    BIC (Smaller is Better) 254.5

    Solution for Fixed Effects
    Effect region treatment Estimate Standard
    Error
    DF t Value Pr > |t|
    Intercept     572.32 44.5919 4 12.83 0.0002
    region 1   -45.6100 19.4224 20 -2.35 0.0293
    region 2   -137.05 9.7134 20 -14.11 <.0001
    region 3   0 . . . .
    treatment   1 -360.03 41.6050 20 -8.65 <.0001
    treatment   2 0 . . . .
    region*treatment 1 1 261.82 37.6365 20 6.96 <.0001
    region*treatment 1 2 0 . . . .
    region*treatment 2 1 162.50 18.8225 20 8.63 <.0001
    region*treatment 2 2 0 . . . .
    region*treatment 3 1 0 . . . .
    region*treatment 3 2 0 . . . .

     
    Covariance Parameter Estimates
    Cov Parm Subject Estimate
    Intercept animal 7637.30
    region UN(1,1) animal 2127.74
    UN(2,1) animal 1987.29
    UN(2,2) animal 2744.66
    UN(3,1) animal 1374.51
    UN(3,2) animal 2732.22
    UN(3,3) animal 3419.70
    treatment UN(1,1) animal 1.0000
    UN(2,1) animal -0.4284
    UN(2,2) animal 0.6740

    SPSS Output:






    ------------------------------
    Brady West
    ------------------------------