BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
emaneman
Pyrite | Level 9

Design:

 

I am interested in assessing how the emotional intensity recorded in videos, changes over time (during the video), depending on the type of video (A vs. B).

 

I have a total of 203 videos.

 

The dependent variable is emotional intensity, for which I have 5 measurements, taken at regular intervals. 

 

My specific hypothesis is that the emotion intensity will increase from the beginning of the video until about the middle of it, and then decrease. In other words, a quadratic trend. However, I expect this trend to be more pronounced in one type of video than in the other. Thus, the basic syntax is using PROC GLM would be:

 

proc glm data=wide;
class type;
model intensity1-intensity5= genre;
repeated intervals 5 (1 2 3 4 5) polynomial/summary printm;
means type;

 

However, I am asked to test the hypothesis treating the variable INTERVALS as a continuous predictor. I have re-organized the data in the long format. 

 

DATA and syntax are attached.

 

The basic proc mixed model would thus be:

 

MODEL 1

proc mixed data=datalong;

class id type ;
model intensity= type | intervals | intervals ;

 

I have received two types of suggestions to add a REPEATED or a RANDOM factor.

 

MODEL 2

proc mixed data=datalong;

class id type ;
model intensity= type | intervals | intervals ;

REPEATED / TYPE = vc SUB = id;  

 

MODEL 3

proc mixed data=datalong;

class id type ;
model intensity= type | intervals | intervals ;

RANDOM / TYPE = vc SUB = id;  

 

MODEL 1, 2 and 3, however, produce virtually identical results.

 

Thoughts?

 

DATA DATALONG;
INPUT ID$ TYPE$ INTERVALS INTENSITY;

CARDS;
1  A  -1.413516734  -0.649020828
1  A  -0.706758367  -1.22358075
1  A  0  1.352921145
1  A  0.706758367  0.500871969
1  A  1.413516734  0.018808464
2  A  -1.413516734  -1.266169712
2  A  -0.706758367  0.971700973
2  A  0  -0.112375142
2  A  0.706758367  1.027200532
2  A  1.413516734  -0.620356651
3  A  -1.413516734  -1.560937174
3  A  -0.706758367  1.031723315
3  A  0  0.663046994
3  A  0.706758367  0.091883888
3  A  1.413516734  -0.225717022
4  B  -1.413516734  -1.319423504
4  B  -0.706758367  1.140810514
4  B  0  0.059537663
4  B  0.706758367  -0.628589792
4  B  1.413516734  0.747665118
5  B  -1.413516734  1.137849518
5  B  -0.706758367  -0.669917033
5  B  0  0.050520402
5  B  0.706758367  0.770229877
5  B  1.413516734  -1.288682765
6  A  -1.413516734  0.461239549
6  A  -0.706758367  0.634366686
6  A  0  0.962105976
6  A  0.706758367  -0.61527461
6  A  1.413516734  -1.442437601
7  B  -1.413516734  -1.572540346
7  B  -0.706758367  0.774956933
7  B  0  0.216181258
7  B  0.706758367  -0.305457477
7  B  1.413516734  0.886859632
8  A  -1.413516734  0.740387309
8  A  -0.706758367  -0.896557429
8  A  0  -0.546936403
8  A  0.706758367  -0.673554681
8  A  1.413516734  1.376661204
9  B  -1.413516734  -0.145695931
9  B  -0.706758367  0.975464197
9  B  0  -1.519329145
9  B  0.706758367  0.835256811
9  B  1.413516734  -0.145695931
10  A  -1.413516734  -1.021781313
10  A  -0.706758367  -0.905008882
10  A  0  -0.086925578
10  A  0.706758367  0.781203054
10  A  1.413516734  1.232512719
11  B  -1.413516734  1.242033793
11  B  -0.706758367  -0.875904541
11  B  0  -1.160073879
11  B  0.706758367  0.51779833
11  B  1.413516734  0.276146298
12  A  -1.413516734  -0.768500659
12  A  -0.706758367  -0.884066505
12  A  0  0.356861469
12  A  0.706758367  1.559186052
12  A  1.413516734  -0.263480356
13  B  -1.413516734  -0.89982493
13  B  -0.706758367  -0.923825546
13  B  0  0.799374645
13  B  0.706758367  1.278065831
13  B  1.413516734  -0.25379
14  B  -1.413516734  -1.776132654
14  B  -0.706758367  0.408899645
14  B  0  0.501799066
14  B  0.706758367  0.593750534
14  B  1.413516734  0.271683409
15  A  -1.413516734  1.539220225
15  A  -0.706758367  -0.458170414
15  A  0  -0.964716892
15  A  0.706758367  -0.549814512
15  A  1.413516734  0.433481594
16  B  -1.413516734  0.321052768
16  B  -0.706758367  -0.642683252
16  B  0  1.43604545
16  B  0.706758367  0.075523291
16  B  1.413516734  -1.189938257
17  A  -1.413516734  -1.134751647
17  A  -0.706758367  -0.485262609
17  A  0  -0.246074762
17  A  0.706758367  1.514061721
17  A  1.413516734  0.352027297
18  B  -1.413516734  -1.409270477
18  B  -0.706758367  -0.680288709
18  B  0  0.947605593
18  B  0.706758367  0.546700973
18  B  1.413516734  0.59525262
19  B  -1.413516734  -0.091435218
19  B  -0.706758367  0.166472909
19  B  0  1.54723158
19  B  0.706758367  -0.454678455
19  B  1.413516734  -1.167590816
20  B  -1.413516734  0.266057064
20  B  -0.706758367  0.836500601
20  B  0  -0.113988761
20  B  0.706758367  0.673588124
20  B  1.413516734  -1.662157028
21  B  -1.413516734  -1.337532168
21  B  -0.706758367  -0.385549218
21  B  0  1.247270846
21  B  0.706758367  -0.205646928
21  B  1.413516734  0.681457467
22  B  -1.413516734  -0.822686691
22  B  -0.706758367  -1.292686346
22  B  0  0.381949087
22  B  0.706758367  0.822642622
22  B  1.413516734  0.910781329
23  A  -1.413516734  -1.657960629
23  A  -0.706758367  0.024777839
23  A  0  0.298950016
23  A  0.706758367  1.035282758
23  A  1.413516734  0.298950016
24  B  -1.413516734  -0.247658323
24  B  -0.706758367  -1.614057502
24  B  0  0.752020732
24  B  0.706758367  0.278951774
24  B  1.413516734  0.830743319
25  A  -1.413516734  -0.241190546
25  A  -0.706758367  -0.102269521
25  A  0  -1.445799746
25  A  0.706758367  1.241260705
25  A  1.413516734  0.547999108
26  A  -1.413516734  -1.122265459
26  A  -0.706758367  -0.675375759
26  A  0  -0.228242522
26  A  0.706758367  0.712782984
26  A  1.413516734  1.313100756
27  B  -1.413516734  -0.8079403
27  B  -0.706758367  1.490871229
27  B  0  0.57571436
27  B  0.706758367  -0.607024172
27  B  1.413516734  -0.651621116
28  A  -1.413516734  -0.674973988
28  A  -0.706758367  -0.085728935
28  A  0  0.977400336
28  A  0.706758367  1.02263988
28  A  1.413516734  -1.239337293
29  B  -1.413516734  -1.191021761
29  B  -0.706758367  0.51427148
29  B  0  1.340589345
29  B  0.706758367  -0.71887629
29  B  1.413516734  0.055037226
30  B  -1.413516734  0.347520833
30  B  -0.706758367  0.60946281
30  B  0  0.347520833
30  B  0.706758367  0.473835606
30  B  1.413516734  -1.778340081
31  A  -1.413516734  -1.044811468
31  A  -0.706758367  -0.487717758
31  A  0  -0.119174727
31  A  0.706758367  1.629666257
31  A  1.413516734  0.022037697
32  B  -1.413516734  0.377497667
32  B  -0.706758367  1.199257881
32  B  0  0.444011551
32  B  0.706758367  -1.310700011
32  B  1.413516734  -0.710067088
33  B  -1.413516734  -1.651339211
33  B  -0.706758367  0.597787457
33  B  0  -0.127175749
33  B  0.706758367  0.27216839
33  B  1.413516734  0.908559113
34  B  -1.413516734  0.061473535
34  B  -0.706758367  1.67256508
34  B  0  -0.236801918
34  B  0.706758367  -0.644184056
34  B  1.413516734  -0.853052642
35  B  -1.413516734  -1.354204425
35  B  -0.706758367  -0.017152506
35  B  0  0.093354624
35  B  0.706758367  1.45768184
35  B  1.413516734  -0.179679532
36  B  -1.413516734  -0.99842569
36  B  -0.706758367  -1.180087379
36  B  0  0.693005702
36  B  0.706758367  0.626743021
36  B  1.413516734  0.858764347
37  B  -1.413516734  0.048336135
37  B  -0.706758367  1.497872157
37  B  0  0.134924676
37  B  0.706758367  -0.438861416
37  B  1.413516734  -1.242271552
38  B  -1.413516734  0.035400547
38  B  -0.706758367  0.974537095
38  B  0  0.935280584
38  B  0.706758367  -0.596884807
38  B  1.413516734  -1.348333419
39  B  -1.413516734  0.087620348
39  B  -0.706758367  -0.483005168
39  B  0  1.30593249
39  B  0.706758367  0.449994216
39  B  1.413516734  -1.360541885
40  A  -1.413516734  -0.784073
40  A  -0.706758367  -1.223691138
40  A  0  0.730061411
40  A  0.706758367  0.119930495
40  A  1.413516734  1.157772232
41  B  -1.413516734  -0.350360014
41  B  -0.706758367  -1.027540304
41  B  0  1.331151055
41  B  0.706758367  0.747374944
41  B  1.413516734  -0.700625681
42  B  -1.413516734  -0.951051299
42  B  -0.706758367  1.390401503
42  B  0  -0.786447167
42  B  0.706758367  0.66525357
42  B  1.413516734  -0.318156607
43  B  -1.413516734  0.557778933
43  B  -0.706758367  -0.619332194
43  B  0  1.413445252
43  B  0.706758367  -0.232281236
43  B  1.413516734  -1.119610755
44  B  -1.413516734  -1.644533236
44  B  -0.706758367  -0.119318781
44  B  0  0.409288717
44  B  0.706758367  0.990598856
44  B  1.413516734  0.363964445
45  A  -1.413516734  1.047673592
45  A  -0.706758367  0.822666805
45  A  0  0.181876683
45  A  0.706758367  -1.234342509
45  A  1.413516734  -0.817874571
46  B  -1.413516734  -0.11204195
46  B  -0.706758367  -0.238523675
46  B  0  -1.449058065
46  B  0.706758367  1.224974164
46  B  1.413516734  0.574649526
47  B  -1.413516734  0.767099888
47  B  -0.706758367  1.036673856
47  B  0  -0.186993031
47  B  0.706758367  -0.103085902
47  B  1.413516734  -1.513694811
48  A  -1.413516734  1.344705303
48  A  -0.706758367  -0.423005157
48  A  0  -0.717508256
48  A  0.706758367  -0.961505342
48  A  1.413516734  0.757313452
49  A  -1.413516734  -1.704177562
49  A  -0.706758367  0.792346949
49  A  0  0.311266676
49  A  0.706758367  0.60910205
49  A  1.413516734  -0.008538114
50  A  -1.413516734  -0.434706336
50  A  -0.706758367  0.987221013
50  A  0  0.763697404
50  A  0.706758367  0.174655698
50  A  1.413516734  -1.490867779
51  A  -1.413516734  -0.764773019
51  A  -0.706758367  0.353237072
51  A  0  1.180736729
51  A  0.706758367  -1.279131457
51  A  1.413516734  0.509930675
52  A  -1.413516734  -0.390557847
52  A  -0.706758367  -0.983770116
52  A  0  -0.347732362
52  A  0.706758367  0.062282001
52  A  1.413516734  1.659778324
53  A  -1.413516734  -1.086147455
53  A  -0.706758367  1.241344627
53  A  0  -0.848976012
53  A  0.706758367  -0.051809974
53  A  1.413516734  0.745588814
54  B  -1.413516734  -0.407976115
54  B  -0.706758367  0.540762297
54  B  0  1.252515365
54  B  0.706758367  0.018969455
54  B  1.413516734  -1.404271002
55  B  -1.413516734  -0.295718846
55  B  -0.706758367  1.737756778
55  B  0  -0.147884565
55  B  0.706758367  -0.517721687
55  B  1.413516734  -0.77643168
56  A  -1.413516734  -0.601017706
56  A  -0.706758367  0.797676563
56  A  0  -0.601017706
56  A  0.706758367  -0.929084139
56  A  1.413516734  1.333442987
57  B  -1.413516734  0.495833311
57  B  -0.706758367  0.711015579
57  B  0  0.272004223
57  B  0.706758367  0.280651042
57  B  1.413516734  -1.759504154
58  A  -1.413516734  -1.636577989
58  A  -0.706758367  0.547101144
58  A  0  0.988667422
58  A  0.706758367  0.19138039
58  A  1.413516734  -0.090570967
59  B  -1.413516734  -0.516802394
59  B  -0.706758367  -1.327088346
59  B  0  1.322636808
59  B  0.706758367  0.052623542
59  B  1.413516734  0.468630391
60  A  -1.413516734  -0.910062825
60  A  -0.706758367  -0.673758758
60  A  0  0.656415769
60  A  0.706758367  1.427267217
60  A  1.413516734  -0.499861403
61  B  -1.413516734  -1.027894298
61  B  -0.706758367  -0.961514298
61  B  0  1.342819983
61  B  0.706758367  0.381258271
61  B  1.413516734  0.265330342
62  B  -1.413516734  0.107103769
62  B  -0.706758367  1.475482651
62  B  0  -1.063724775
62  B  0.706758367  -0.78161883
62  B  1.413516734  0.262757184
63  A  -1.413516734  -0.515915497
63  A  -0.706758367  -0.213734385
63  A  0  0.923064784
63  A  0.706758367  -1.283593198
63  A  1.413516734  1.090178297
64  B  -1.413516734  -1.329655805
64  B  -0.706758367  -0.742270609
64  B  0  0.803819364
64  B  0.706758367  0.97381555
64  B  1.413516734  0.2942915
65  A  -1.413516734  1.295806273
65  A  -0.706758367  -0.809967287
65  A  0  -0.913356085
65  A  0.706758367  -0.394202931
65  A  1.413516734  0.821720031
66  B  -1.413516734  -1.170440296
66  B  -0.706758367  -0.305096136
66  B  0  1.027195569
66  B  0.706758367  -0.606898266
66  B  1.413516734  1.055239129
67  B  -1.413516734  -1.323346074
67  B  -0.706758367  0.485373944
67  B  0  -0.210246217
67  B  0.706758367  1.366600414
67  B  1.413516734  -0.318382066
68  B  -1.413516734  -0.748945997
68  B  -0.706758367  -0.698681165
68  B  0  0.871584014
68  B  0.706758367  1.294339857
68  B  1.413516734  -0.718296709
69  B  -1.413516734  -0.704016665
69  B  -0.706758367  -1.330556878
69  B  0  0.266267401
69  B  0.706758367  1.107342785
69  B  1.413516734  0.660963357
70  A  -1.413516734  -1.28102959
70  A  -0.706758367  -0.403708608
70  A  0  1.329267888
70  A  0.706758367  -0.249962086
70  A  1.413516734  0.605432397
71  B  -1.413516734  0.678357874
71  B  -0.706758367  0.25848688
71  B  0  0.224206735
71  B  0.706758367  0.591806586
71  B  1.413516734  -1.752858075
72  A  -1.413516734  -1.258277415
72  A  -0.706758367  0.513227048
72  A  0  1.326728368
72  A  0.706758367  -0.625467999
72  A  1.413516734  0.043789998
73  B  -1.413516734  -0.987053622
73  B  -0.706758367  1.023156944
73  B  0  -1.128411681
73  B  0.706758367  0.312708984
73  B  1.413516734  0.779599375
74  B  -1.413516734  0.215585249
74  B  -0.706758367  0.850073553
74  B  0  -0.077777607
74  B  0.706758367  0.67586579
74  B  1.413516734  -1.663746985
75  B  -1.413516734  -1.348105226
75  B  -0.706758367  -0.194776828
75  B  0  0.90244501
75  B  0.706758367  1.070281015
75  B  1.413516734  -0.429843971
76  B  -1.413516734  -0.550179642
76  B  -0.706758367  0.674123938
76  B  0  -0.365777137
76  B  0.706758367  1.36184849
76  B  1.413516734  -1.120015649
77  B  -1.413516734  0.443103875
77  B  -0.706758367  0.63596529
77  B  0  -1.388602188
77  B  0.706758367  -0.688763489
77  B  1.413516734  0.998296512
78  A  -1.413516734  -0.86076395
78  A  -0.706758367  0.958138475
78  A  0  1.167906948
78  A  0.706758367  -0.929777778
78  A  1.413516734  -0.335503695
79  B  -1.413516734  -1.406755519
79  B  -0.706758367  -0.553891567
79  B  0  0.204971891
79  B  0.706758367  1.133798406
79  B  1.413516734  0.62187679
80  B  -1.413516734  -0.090091966
80  B  -0.706758367  1.230988733
80  B  0  -0.248557298
80  B  0.706758367  0.557980299
80  B  1.413516734  -1.450319769
81  B  -1.413516734  1.379448423
81  B  -0.706758367  -1.029479391
81  B  0  -0.75052555
81  B  0.706758367  0.644002762
81  B  1.413516734  -0.243446245
82  B  -1.413516734  -0.560544241
82  B  -0.706758367  -0.129863047
82  B  0  -1.260527852
82  B  0.706758367  0.678044204
82  B  1.413516734  1.272890936
83  A  -1.413516734  1.080286927
83  A  -0.706758367  -1.640838833
83  A  0  0.3137458
83  A  0.706758367  0.046803363
83  A  1.413516734  0.200002743
84  B  -1.413516734  -1.212655624
84  B  -0.706758367  1.156182523
84  B  0  0.513753617
84  B  0.706758367  0.41331488
84  B  1.413516734  -0.870595396
85  A  -1.413516734  -0.638935123
85  A  -0.706758367  -1.436867091
85  A  0  0.446515382
85  A  0.706758367  0.830629265
85  A  1.413516734  0.798657567
86  A  -1.413516734  -0.636744316
86  A  -0.706758367  0.726426614
86  A  0  -0.847946128
86  A  0.706758367  1.394111323
86  A  1.413516734  -0.635847493
87  B  -1.413516734  -0.493203747
87  B  -0.706758367  0.244787922
87  B  0  0.825729618
87  B  0.706758367  0.90473196
87  B  1.413516734  -1.482045754
88  B  -1.413516734  -1.516677871
88  B  -0.706758367  -0.535490729
88  B  0  0.757747585
88  B  0.706758367  0.624921138
88  B  1.413516734  0.669499877
89  A  -1.413516734  -0.958674158
89  A  -0.706758367  0.453207714
89  A  0  -1.050881576
89  A  0.706758367  1.30736441
89  A  1.413516734  0.248983611
90  B  -1.413516734  -1.133484495
90  B  -0.706758367  0.413278144
90  B  0  1.153610934
90  B  0.706758367  -0.964925561
90  B  1.413516734  0.531520978
91  B  -1.413516734  -1.191967603
91  B  -0.706758367  1.367660474
91  B  0  0.584414283
91  B  0.706758367  -0.577912827
91  B  1.413516734  -0.182194327
92  B  -1.413516734  -0.440378229
92  B  -0.706758367  -0.376889886
92  B  0  1.586788799
92  B  0.706758367  0.267175735
92  B  1.413516734  -1.036696418
93  A  -1.413516734  -0.549930303
93  A  -0.706758367  0.597367599
93  A  0  0.965128905
93  A  0.706758367  0.467526341
93  A  1.413516734  -1.480092541
94  A  -1.413516734  1.112948445
94  A  -0.706758367  0.066000305
94  A  0  -1.598649949
94  A  0.706758367  0.447793359
94  A  1.413516734  -0.028092159
95  A  -1.413516734  0.404534353
95  A  -0.706758367  1.180764574
95  A  0  -0.47300049
95  A  0.706758367  0.338225873
95  A  1.413516734  -1.45052431
96  A  -1.413516734  -0.713855147
96  A  -0.706758367  -0.377876811
96  A  0  -0.18913604
96  A  0.706758367  1.756573795
96  A  1.413516734  -0.475705797
97  A  -1.413516734  -0.846463825
97  A  -0.706758367  -0.773664276
97  A  0  -0.556657971
97  A  0.706758367  1.142594886
97  A  1.413516734  1.034191186
98  B  -1.413516734  0.526122568
98  B  -0.706758367  1.304819893
98  B  0  -1.336622864
98  B  0.706758367  -0.0106186
98  B  1.413516734  -0.483700998
99  A  -1.413516734  -0.196889714
99  A  -0.706758367  1.431960964
99  A  0  0.053789168
99  A  0.706758367  0.089479996
99  A  1.413516734  -1.378340413
100  B  -1.413516734  0.621378184
100  B  -0.706758367  0.054566404
100  B  0  -1.439090988
100  B  0.706758367  -0.408595319
100  B  1.413516734  1.171741719
101  B  -1.413516734  -1.551472906
101  B  -0.706758367  1.109624323
101  B  0  -0.163178482
101  B  0.706758367  0.02682386
101  B  1.413516734  0.578203206
102  B  -1.413516734  -1.160215278
102  B  -0.706758367  -0.082986892
102  B  0  1.600493041
102  B  0.706758367  -0.282586104
102  B  1.413516734  -0.074704767
103  B  -1.413516734  -0.464371569
103  B  -0.706758367  0.856140684
103  B  0  -1.3618594
103  B  0.706758367  -0.117525836
103  B  1.413516734  1.087616121
104  B  -1.413516734  -1.060445275
104  B  -0.706758367  0.541098291
104  B  0  0.77578344
104  B  0.706758367  0.858683156
104  B  1.413516734  -1.115119612
105  A  -1.413516734  -1.131330538
105  A  -0.706758367  -0.66411366
105  A  0  0.673679894
105  A  0.706758367  1.334193888
105  A  1.413516734  -0.212429585
106  A  -1.413516734  -0.024363999
106  A  -0.706758367  -1.545156981
106  A  0  0.901027645
106  A  0.706758367  0.871184193
106  A  1.413516734  -0.202690858
107  B  -1.413516734  -1.234569059
107  B  -0.706758367  1.218282127
107  B  0  -0.799433259
107  B  0.706758367  0.308274337
107  B  1.413516734  0.507445854
108  A  -1.413516734  0.815379207
108  A  -0.706758367  1.125980772
108  A  0  -1.378870563
108  A  0.706758367  -0.343865991
108  A  1.413516734  -0.218623425
109  A  -1.413516734  -1.054422407
109  A  -0.706758367  0.805772044
109  A  0  0.274585266
109  A  0.706758367  -1.05296539
109  A  1.413516734  1.027030487
110  A  -1.413516734  -1.619160212
110  A  -0.706758367  -0.005113082
110  A  0  1.016449079
110  A  0.706758367  0.587108326
110  A  1.413516734  0.020715889
111  A  -1.413516734  -1.620616694
111  A  -0.706758367  0.662940431
111  A  0  -0.203646713
111  A  0.706758367  0.250279886
111  A  1.413516734  0.91104309
112  B  -1.413516734  1.159341266
112  B  -0.706758367  0.347327518
112  B  0  -0.989521627
112  B  0.706758367  -1.101905596
112  B  1.413516734  0.584758439
113  B  -1.413516734  -0.091725089
113  B  -0.706758367  0.974739683
113  B  0  -1.005452874
113  B  0.706758367  1.066962152
113  B  1.413516734  -0.944523872
114  A  -1.413516734  -0.845637362
114  A  -0.706758367  0.420142769
114  A  0  0.293712054
114  A  0.706758367  1.293373941
114  A  1.413516734  -1.161591402
115  A  -1.413516734  -1.417334273
115  A  -0.706758367  0.745189874
115  A  0  1.006205061
115  A  0.706758367  0.261693777
115  A  1.413516734  -0.595754439
116  A  -1.413516734  0.48083009
116  A  -0.706758367  -1.786741632
116  A  0  0.493370708
116  A  0.706758367  0.44389227
116  A  1.413516734  0.368648563
117  A  -1.413516734  -0.957937548
117  A  -0.706758367  0.773626794
117  A  0  1.341922118
117  A  0.706758367  -0.497965615
117  A  1.413516734  -0.659645749
118  B  -1.413516734  -0.378855452
118  B  -0.706758367  0.160210359
118  B  0  0.421657277
118  B  0.706758367  1.246158435
118  B  1.413516734  -1.449170619
119  A  -1.413516734  0.603279023
119  A  -0.706758367  -0.768297163
119  A  0  -1.058846091
119  A  0.706758367  1.37864491
119  A  1.413516734  -0.154780679
120  B  -1.413516734  0.160343128
120  B  -0.706758367  -1.628183698
120  B  0  0.29587907
120  B  0.706758367  1.109916158
120  B  1.413516734  0.062045343
121  A  -1.413516734  -1.528516703
121  A  -0.706758367  -0.179809425
121  A  0  0.08545182
121  A  0.706758367  1.203318983
121  A  1.413516734  0.419555325
122  A  -1.413516734  -0.663130888
122  A  -0.706758367  -0.259878866
122  A  0  1.277909984
122  A  0.706758367  0.770360359
122  A  1.413516734  -1.125260589
123  A  -1.413516734  -0.943387146
123  A  -0.706758367  0.185141818
123  A  0  1.375782875
123  A  0.706758367  0.395606258
123  A  1.413516734  -1.013143805
124  A  -1.413516734  0.099643368
124  A  -0.706758367  1.361162151
124  A  0  -0.713250194
124  A  0.706758367  -1.195106913
124  A  1.413516734  0.447551588
125  A  -1.413516734  0.442619289
125  A  -0.706758367  -0.412297131
125  A  0  -0.346493835
125  A  0.706758367  1.474151756
125  A  1.413516734  -1.15798008
126  A  -1.413516734  -0.763737187
126  A  -0.706758367  0.803184158
126  A  0  -0.763737187
126  A  0.706758367  1.343472798
126  A  1.413516734  -0.619182582
127  B  -1.413516734  1.361127274
127  B  -0.706758367  0.757633833
127  B  0  -0.695287969
127  B  0.706758367  -0.90764506
127  B  1.413516734  -0.515828078
128  B  -1.413516734  1.180139021
128  B  -0.706758367  -0.417615973
128  B  0  0.924967609
128  B  0.706758367  -0.566715229
128  B  1.413516734  -1.120775429
129  B  -1.413516734  1.196829163
129  B  -0.706758367  -0.598849792
129  B  0  -0.979223861
129  B  0.706758367  -0.576654051
129  B  1.413516734  0.957898541
130  B  -1.413516734  -0.63856556
130  B  -0.706758367  -0.583078665
130  B  0  0.249924162
130  B  0.706758367  1.651551086
130  B  1.413516734  -0.679831023
131  B  -1.413516734  1.381938457
131  B  -0.706758367  0.600617141
131  B  0  -0.224544843
131  B  0.706758367  -1.137640118
131  B  1.413516734  -0.620370637
132  A  -1.413516734  0.468527085
132  A  -0.706758367  -1.344541897
132  A  0  -0.312441498
132  A  0.706758367  -0.170250611
132  A  1.413516734  1.358706921
133  B  -1.413516734  -0.049235614
133  B  -0.706758367  -0.03848548
133  B  0  1.625366506
133  B  0.706758367  -0.475478426
133  B  1.413516734  -1.062166987
134  B  -1.413516734  -0.829243651
134  B  -0.706758367  -0.894921378
134  B  0  1.183487693
134  B  0.706758367  0.964839059
134  B  1.413516734  -0.424161723
135  B  -1.413516734  -0.090673275
135  B  -0.706758367  -0.151939001
135  B  0  -1.420696492
135  B  0.706758367  1.36410924
135  B  1.413516734  0.299199528
136  A  -1.413516734  0.150370101
136  A  -0.706758367  1.417277463
136  A  0  -0.879252849
136  A  0.706758367  0.348148008
136  A  1.413516734  -1.036542723
137  B  -1.413516734  -1.242340364
137  B  -0.706758367  -0.558566663
137  B  0  0.064528136
137  B  0.706758367  0.305639894
137  B  1.413516734  1.430738997
138  A  -1.413516734  0.40961018
138  A  -0.706758367  0.146167948
138  A  0  0.52664166
138  A  0.706758367  -1.755229394
138  A  1.413516734  0.672809607
139  A  -1.413516734  -0.764714576
139  A  -0.706758367  -1.110872206
139  A  0  1.443796652
139  A  0.706758367  0.174637163
139  A  1.413516734  0.257152967
140  A  -1.413516734  -0.311733177
140  A  -0.706758367  -1.371134631
140  A  0  1.358577953
140  A  0.706758367  -0.087350803
140  A  1.413516734  0.411640658
141  A  -1.413516734  0.164680252
141  A  -0.706758367  0.333154291
141  A  0  -1.746688909
141  A  0.706758367  0.749222767
141  A  1.413516734  0.499631599
142  B  -1.413516734  -1.11875537
142  B  -0.706758367  -0.586090134
142  B  0  0.285759854
142  B  0.706758367  -0.10172903
142  B  1.413516734  1.520814679
143  B  -1.413516734  -1.063476114
143  B  -0.706758367  0.708220713
143  B  0  0.443194854
143  B  0.706758367  0.996980231
143  B  1.413516734  -1.084919683
144  A  -1.413516734  -0.192526036
144  A  -0.706758367  -0.43722146
144  A  0  0.314362284
144  A  0.706758367  -1.188266821
144  A  1.413516734  1.503652034
145  A  -1.413516734  -0.670977771
145  A  -0.706758367  -0.70496854
145  A  0  1.192916019
145  A  0.706758367  -0.806540954
145  A  1.413516734  0.989571245
146  A  -1.413516734  -0.797892868
146  A  -0.706758367  1.254428106
146  A  0  -0.003167384
146  A  0.706758367  -1.145105361
146  A  1.413516734  0.691737508
147  A  -1.413516734  0.989514659
147  A  -0.706758367  -1.032172592
147  A  0  0.829962371
147  A  0.706758367  -1.085287528
147  A  1.413516734  0.29798309
148  B  -1.413516734  -1.425758762
148  B  -0.706758367  0.372148508
148  B  0  0.692584311
148  B  0.706758367  0.981722853
148  B  1.413516734  -0.62069691
149  B  -1.413516734  -0.841761495
149  B  -0.706758367  -0.918604508
149  B  0  -0.380290285
149  B  0.706758367  1.147067873
149  B  1.413516734  0.993588415
150  A  -1.413516734  -1.238273467
150  A  -0.706758367  -0.795170395
150  A  0  0.353250246
150  A  0.706758367  1.226148511
150  A  1.413516734  0.454045105
151  A  -1.413516734  0.178919856
151  A  -0.706758367  0.206956463
151  A  0  -1.107163063
151  A  0.706758367  -0.74371603
151  A  1.413516734  1.465002774
152  B  -1.413516734  -1.107242699
152  B  -0.706758367  -0.982272737
152  B  0  0.261244628
152  B  0.706758367  1.100707168
152  B  1.413516734  0.72756364
153  A  -1.413516734  -1.624263668
153  A  -0.706758367  0.291827112
153  A  0  -0.230477094
153  A  0.706758367  0.748782332
153  A  1.413516734  0.814131318
154  A  -1.413516734  -0.047302986
154  A  -0.706758367  1.275221314
154  A  0  0.20236721
154  A  0.706758367  -1.523771912
154  A  1.413516734  0.093486374
155  B  -1.413516734  -0.443735795
155  B  -0.706758367  -0.322006013
155  B  0  -1.257235026
155  B  0.706758367  1.20195249
155  B  1.413516734  0.821024344
156  B  -1.413516734  -1.763544789
156  B  -0.706758367  0.657443609
156  B  0  0.533489003
156  B  0.706758367  0.353851664
156  B  1.413516734  0.218760512
157  A  -1.413516734  -0.930880478
157  A  -0.706758367  1.644596719
157  A  0  -0.389772719
157  A  0.706758367  0.172969049
157  A  1.413516734  -0.49691257
158  A  -1.413516734  -0.941541719
158  A  -0.706758367  -0.28730457
158  A  0  1.390854534
158  A  0.706758367  0.654983516
158  A  1.413516734  -0.816991759
159  B  -1.413516734  -1.19594491
159  B  -0.706758367  0.386569671
159  B  0  -0.237671136
159  B  0.706758367  1.476318821
159  B  1.413516734  -0.429272446
160  B  -1.413516734  0.084710888
160  B  -0.706758367  0.27274192
160  B  0  0.672550172
160  B  0.706758367  -1.726541648
160  B  1.413516734  0.696538667
161  B  -1.413516734  0.948100663
161  B  -0.706758367  -0.306401608
161  B  0  1.15953363
161  B  0.706758367  -0.758339575
161  B  1.413516734  -1.04289311
162  B  -1.413516734  1.33220146
162  B  -0.706758367  -0.624160802
162  B  0  0.795151915
162  B  0.706758367  -0.943432205
162  B  1.413516734  -0.559760369
163  A  -1.413516734  -0.513519242
163  A  -0.706758367  1.397160984
163  A  0  0.683049036
163  A  0.706758367  -0.995975572
163  A  1.413516734  -0.570715206
164  A  -1.413516734  -1.187821105
164  A  -0.706758367  0.034524868
164  A  0  -0.669689274
164  A  0.706758367  0.422735531
164  A  1.413516734  1.400249979
165  B  -1.413516734  -1.00777335
165  B  -0.706758367  0.331238269
165  B  0  -1.109978102
165  B  0.706758367  1.046240286
165  B  1.413516734  0.740272897
166  A  -1.413516734  1.557852371
166  A  -0.706758367  0.023527379
166  A  0  0.112219755
166  A  0.706758367  -0.595991522
166  A  1.413516734  -1.097607983
167  B  -1.413516734  -1.61780722
167  B  -0.706758367  0.492292231
167  B  0  0.64301362
167  B  0.706758367  0.793735009
167  B  1.413516734  -0.31123364
168  A  -1.413516734  0.75158832
168  A  -0.706758367  -0.326071264
168  A  0  -0.509313013
168  A  0.706758367  1.280017904
168  A  1.413516734  -1.196221948
169  A  -1.413516734  -0.545199417
169  A  -0.706758367  0.675555295
169  A  0  0.939947231
169  A  0.706758367  -1.48122435
169  A  1.413516734  0.410921241
170  A  -1.413516734  -0.226959399
170  A  -0.706758367  -0.78493118
170  A  0  -1.06548819
170  A  0.706758367  1.178967889
170  A  1.413516734  0.898410879
171  B  -1.413516734  1.683152805
171  B  -0.706758367  -0.951878827
171  B  0  -0.418021418
171  B  0.706758367  -0.292857416
171  B  1.413516734  -0.020395145
172  A  -1.413516734  -1.185413488
172  A  -0.706758367  1.336313639
172  A  0  -0.370895626
172  A  0.706758367  0.678899377
172  A  1.413516734  -0.458903903
173  A  -1.413516734  -0.540369602
173  A  -0.706758367  0.719949327
173  A  0  0.49774562
173  A  0.706758367  0.825926986
173  A  1.413516734  -1.503252331
174  B  -1.413516734  -0.767085903
174  B  -0.706758367  -0.797061714
174  B  0  0.042015275
174  B  0.706758367  1.659971929
174  B  1.413516734  -0.137839587
175  A  -1.413516734  0.219230265
175  A  -0.706758367  1.081954594
175  A  0  0.221414377
175  A  0.706758367  0.125586453
175  A  1.413516734  -1.648185689
176  A  -1.413516734  -0.244735088
176  A  -0.706758367  -1.509546545
176  A  0  -0.06615639
176  A  0.706758367  0.910219012
176  A  1.413516734  0.910219012
177  B  -1.413516734  -1.191578014
177  B  -0.706758367  0.52148828
177  B  0  -0.281805147
177  B  0.706758367  1.418212196
177  B  1.413516734  -0.466317315
178  A  -1.413516734  1.306616934
178  A  -0.706758367  -0.141240936
178  A  0  0.658990285
178  A  0.706758367  -1.207461674
178  A  1.413516734  -0.616904609
179  B  -1.413516734  -0.252780166
179  B  -0.706758367  -0.509571878
179  B  0  0.261858927
179  B  0.706758367  -1.069340861
179  B  1.413516734  1.569833977
180  B  -1.413516734  -1.223053049
180  B  -0.706758367  -0.656031573
180  B  0  0.133515145
180  B  0.706758367  1.388745552
180  B  1.413516734  0.356823925
181  A  -1.413516734  -0.000448432
181  A  -0.706758367  -1.413851411
181  A  0  0.202186974
181  A  0.706758367  1.388851303
181  A  1.413516734  -0.176738433
182  A  -1.413516734  -0.11139156
182  A  -0.706758367  0.680528728
182  A  0  -1.483269312
182  A  0.706758367  -0.216196852
182  A  1.413516734  1.130328997
183  A  -1.413516734  0.944051259
183  A  -0.706758367  -0.024956162
183  A  0  1.066361163
183  A  0.706758367  -0.99272813
183  A  1.413516734  -0.99272813
184  B  -1.413516734  0.477380517
184  B  -0.706758367  -1.007011638
184  B  0  1.466975288
184  B  0.706758367  -0.757386358
184  B  1.413516734  -0.179957809
185  A  -1.413516734  -0.12281912
185  A  -0.706758367  0.540231976
185  A  0  -0.246552793
185  A  0.706758367  1.259501196
185  A  1.413516734  -1.43036126
186  A  -1.413516734  0.830011679
186  A  -0.706758367  -1.356832048
186  A  0  -0.207875635
186  A  0.706758367  -0.393239277
186  A  1.413516734  1.127935281
187  A  -1.413516734  0.935355642
187  A  -0.706758367  0.999491505
187  A  0  0.071867922
187  A  0.706758367  -1.235207563
187  A  1.413516734  -0.771507506
188  A  -1.413516734  1.431221271
188  A  -0.706758367  0.661778928
188  A  0  -0.511851321
188  A  0.706758367  -0.761880699
188  A  1.413516734  -0.81926818
189  A  -1.413516734  0.646923725
189  A  -0.706758367  0.058745639
189  A  0  0.673626288
189  A  0.706758367  0.3527144
189  A  1.413516734  -1.732010052
190  A  -1.413516734  -0.753753137
190  A  -0.706758367  -0.351776986
190  A  0  0.528024386
190  A  0.706758367  1.485110459
190  A  1.413516734  -0.907604723
191  B  -1.413516734  -0.893985087
191  B  -0.706758367  -1.080775641
191  B  0  1.208324289
191  B  0.706758367  0.756684873
191  B  1.413516734  0.009751566
192  A  -1.413516734  -1.444881211
192  A  -0.706758367  0.599860809
192  A  0  0.083046372
192  A  0.706758367  -0.411252339
192  A  1.413516734  1.173226368
193  B  -1.413516734  1.266645776
193  B  -0.706758367  -0.196466949
193  B  0  0.766522033
193  B  0.706758367  -0.714981105
193  B  1.413516734  -1.121719755
194  B  -1.413516734  0.312967621
194  B  -0.706758367  1.500970465
194  B  0  -0.41613842
194  B  0.706758367  -0.199377165
194  B  1.413516734  -1.198422502
195  A  -1.413516734  -1.594113418
195  A  -0.706758367  -0.346177672
195  A  0  0.871188333
195  A  0.706758367  0.59975861
195  A  1.413516734  0.469344147
196  A  -1.413516734  -0.593607517
196  A  -0.706758367  -1.355998566
196  A  0  0.395391053
196  A  0.706758367  0.30552945
196  A  1.413516734  1.248685579
197  B  -1.413516734  -0.579883566
197  B  -0.706758367  0.186117663
197  B  0  1.659196951
197  B  0.706758367  -0.43841823
197  B  1.413516734  -0.827012817
198  A  -1.413516734  -1.377697005
198  A  -0.706758367  0.770389881
198  A  0  0.676948101
198  A  0.706758367  -0.758618364
198  A  1.413516734  0.688977388
199  B  -1.413516734  -1.296625302
199  B  -0.706758367  1.387899133
199  B  0  0.405631642
199  B  0.706758367  -0.019865481
199  B  1.413516734  -0.477039992
200  A  -1.413516734  0.807173334
200  A  -0.706758367  0.308765242
200  A  0  -0.372138355
200  A  0.706758367  0.819323818
200  A  1.413516734  -1.563124039
201  A  -1.413516734  -0.179785369
201  A  -0.706758367  0.948723514
201  A  0  -1.538622494
201  A  0.706758367  -0.064621249
201  A  1.413516734  0.834305598
202  B  -1.413516734  1.59213763
202  B  -0.706758367  -0.285683879
202  B  0  -1.02066536
202  B  0.706758367  0.244976408
202  B  1.413516734  -0.530764799
203  A  -1.413516734  1.59213763
203  A  -0.706758367  -0.285683879
203  A  0  -1.02066536
203  A  0.706758367  0.244976408
203  A  1.413516734  -0.530764799
;

proc mixed data=datalong;
TITLE 'MODEL 1';
class id type ;
model intensity= type | intervals | intervals ;

proc mixed data=datalong;
TITLE 'MODEL 2';
class id type ;
model intensity= type | intervals | intervals ;
REPEATED / TYPE = vc SUB = id;  

proc mixed data=datalong;
TITLE 'MODEL 3';
class id type ;
model intensity= type | intervals | intervals ;
Random intercept  /SUB=id;
1 ACCEPTED SOLUTION

Accepted Solutions
SteveDenham
Jade | Level 19

I would suggest the use of the EFFECT statement which is available in GLIMMIX but not MIXED, perhaps like this:

 

proc glimmix data=have;
class type subject_id;
effect quad =polynomial(intervals/degree=2);
model intensity = type|quad;
random _residual_;/subject=subject_id; /*adding the subject option may make the model unstable, so you may have to remove it */
run;

 

View solution in original post

4 REPLIES 4
SteveDenham
Jade | Level 19

I would suggest the use of the EFFECT statement which is available in GLIMMIX but not MIXED, perhaps like this:

 

proc glimmix data=have;
class type subject_id;
effect quad =polynomial(intervals/degree=2);
model intensity = type|quad;
random _residual_;/subject=subject_id; /*adding the subject option may make the model unstable, so you may have to remove it */
run;

 

emaneman
Pyrite | Level 9
hello Steve,
This works as well, and it gives the exact same results.
Thank you very much.
E
jiltao
SAS Super FREQ

Your REPEATED statement does not really add anything more to the model than the one without the REPEATED statement.

 

If you wanted to model the correlations in the data, you might want to use something like --

repeated / subject=id type=cs;

 

This can also be accomplished by using a RANDOM statement --

random int / subject=id;

 

You just need one of the two, but not both, in your PROC MIXED program.

 

I hope this helps,

Jill

emaneman
Pyrite | Level 9

Hello Jil,

thanks for your response. Yes, they all work and give essentially the same results.

Eman

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 734 views
  • 2 likes
  • 3 in conversation