0
$\begingroup$

I have a dataset and am attempting to run proc mixed with the intent of collecting parameter estimates for future projections. I am interested in how Y changes with X1, over various locations. I am validating the work of another group in the company, and am second-guessing their interpretation of the effects.

After running the code below, the estimate (fixed effects) for x1 is -7.5. Meanwhile, the random effects for x1 in NC is -4.5. Is the interpretation here that x1 in NC deviates below the mean x1 effect, and that I should treat this as -12? Thanks.

data raw_data;
 input day location $ x1 y;
cards;
1 NC 1.50 2.912023005
2 NC 1.50 4.062595033
3 NC 1.50 0.693147181
4 NC 1.50 3.713572067
5 NC 1.50 4.846438775
6 NC 1.50 -4.605170186
7 NC 1.50 2.397895273
8 NC 1.50 4.461468176
9 NC 1.50 4.33073334
10 NC 1.50 3.612041035
11 NC 1.50 2.59471138
12 NC 1.50 4.624972813
13 NC 1.50 4.983606622
14 NC 1.50 5.634789603
15 NC 1.50 3.044522438
16 NC 1.50 4.736198448
17 NC 1.50 4.371611847
18 NC 1.50 4.905753276
19 NC 1.25 7.831882477
20 NC 1.25 6.232448017
21 NC 1.25 6.769641977
22 NC 1.25 8.234106505
23 NC 1.25 6.784189634
24 NC 1.25 5.424950018
25 NC 1.25 6.733401892
26 NC 1.25 7.075173815
27 NC 1.25 5.272999559
28 NC 1.25 6.661854741
29 NC 1.25 9.882801923
30 NC 1.25 5.753590191
31 NC 1.25 6.349138991
32 NC 1.25 5.454347296
33 NC 1.25 6.077642243
34 NC 1.25 6.150602768
35 NC 1.25 6.451038454
36 NC 1.25 7.560681631
37 NC 1.25 6.458338283
38 NC 1.25 5.620400866
39 NC 1.25 5.394449155
40 NC 1.25 6.914730893
1 SC 1.25 4.262679877
2 SC 1.25 5.153291595
3 SC 1.25 4.025351691
4 SC 1.25 4.144185634
5 SC 1.25 4.770684625
6 SC 1.25 4.060443011
7 SC 1.25 3.386294361
8 SC 1.25 3.218875825
9 SC 1.25 3.33220451
10 SC 1.25 -4.605170186
11 SC 1.25 3.218875825
12 SC 1.25 3.091042453
13 SC 1.25 -4.605170186
14 SC 1.25 3.603943825
15 SC 1.25 4.96284463
16 SC 1.25 -4.605170186
17 SC 1.25 4.956545443
18 SC 1.25 4.445719819
19 SC 1.25 1.098612289
20 SC 1.75 3.105945474
21 SC 1.75 4.194405391
22 SC 1.75 4.913503006
23 SC 1.75 3.473890696
24 SC 1.75 3.13122649
25 SC 1.75 4.094344562
26 SC 1.75 4.202535517
27 SC 1.75 2.057897937
28 SC 1.75 3.676753802
29 SC 1.75 3.400620577
30 SC 1.75 4.169350017
31 SC 1.75 3.49677499
32 SC 1.75 1.482681828
33 SC 1.25 3.326149473
34 SC 1.25 3.049856007
35 SC 1.25 2.926577033
36 SC 1.25 4.676753802
37 SC 1.25 2.599870499
38 SC 1.25 2.723585102
39 SC 1.25 3.424869024
40 SC 1.25 2.383506635
1 VA 2.00 3.262679877
2 VA 2.00 3.153291595
3 VA 2.00 4.025351691
4 VA 2.00 4.144185634
5 VA 2.00 3.770684625
6 VA 2.00 4.060443011
7 VA 2.00 4.386294361
8 VA 2.00 4.218875825
9 VA 2.00 4.33220451
10 VA 2.00 4.205170186
11 VA 2.00 4.218875825
12 VA 2.00 4.091042453
13 VA 2.00 4.605170186
14 VA 2.00 3.603943825
15 VA 2.00 3.96284463
16 VA 2.00 3.605170186
17 VA 2.00 3.956545443
18 VA 2.00 3.445719819
19 VA 2.00 4.098612289
20 VA 1.75 8.105945474
21 VA 1.75 9.194405391
22 VA 1.75 7.913503006
23 VA 1.75 9.473890696
24 VA 1.75 9.13122649
25 VA 1.75 8.094344562
26 VA 1.75 9.202535517
27 VA 1.75 8.057897937
28 VA 1.75 8.676753802
29 VA 1.75 7.400620577
30 VA 1.75 9.169350017
31 VA 1.75 9.49677499
32 VA 1.75 9.482681828
33 VA 2.00 8.326149473
34 VA 2.00 9.049856007
35 VA 2.00 7.926577033
36 VA 2.00 9.676753802
37 VA 2.00 8.599870499
38 VA 2.00 9.723585102
39 VA 2.00 9.424869024
40 VA 2.00 9.383506635
;
run;

proc mixed data=raw_data plots(only)=all method=REML;
    class LOCATION;
    model Y=X1
    / solution outp=predicted_output;
    random int X1
    / subject=LOCATION type=vc solution;
run;
$\endgroup$
1
$\begingroup$

I think the interpretation is correct. Please see the following link from the SAS documents: https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_mixed_sect034.htm

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.