import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
import saspy
import saspy.sascfg_personal
sas = saspy.SASsession()
Using SAS Config named: oda Error trying to read authinfo file:/Users/crunning/.authinfo [Errno 2] No such file or directory: '/Users/crunning/.authinfo' Did not find key oda in authinfo file:/Users/crunning/.authinfo
SAS Connection established. Subprocess id is 89960
#For Amylase analysis
puddlong = pd.read_csv('./PuddingByWeekLong_FINAL.csv')
#For sensory analysis
starchall = pd.read_csv('./LongDataAll_Final.csv')
puddlong.head(2)
Participant | PuddTime | PuddRemain | SubjectID | OrderAssigned | Week1 | Week2 | YOB | Race | Ethnicity | Gender | MedsYN | Height | Weight | BMI | DropoutYN | SalivaVolume | Visit | VisitType | Interventionwk | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 1101 | Pudding40s | 9.2 | 1 | HighLow | High | Low | 1994 | Asian | NonHispanic | Female | Y | 1.651 | 54.0 | 19.810691 | N | NaN | 1 | Start | High |
1 | 1102 | Pudding40s | 9.9 | 2 | LowHigh | Low | High | 1997 | White | NonHispanic | Male | Y | 1.753 | 68.0 | 22.128149 | N | NaN | 1 | Start | Low |
puddsas = sas.df2sd(puddlong, 'puddlong')
%%SAS sas
proc sort data = puddlong;
by puddtime orderassigned interventionwk visittype subjectID;
run;
title 'Pudding Remaining by timepoint';
ods output diffs = diff1 tests3=tests1 lsmeans =means1
lsmESTIMATEs =Estim1 SolutionF= sol1;
Proc mixed data=puddlong;
where subjectid ne 15; *DropoutYN = "N" and ;
by puddtime;
class subjectID orderassigned gender visittype interventionwk medsyn;
model puddremain = interventionwk salivavolume visittype medsyn
interventionwk*visittype
/ ddfm = kr solution; *residual ok; *removed orderassigned gender bmi; *added in BMI and Medsyn because of other analysis. BMI not signicant here in whole group.;
repeated / subject = subjectID type = cs;
lsmeans visittype / pdiff ADJDFE=ROW;
lsmeans interventionwk/ pdiff ADJDFE=ROW;
lsmeans interventionwk*visittype / pdiff ADJDFE=ROW;
run;
The Mixed Procedure
Model Information | |
---|---|
Data Set | WORK.PUDDLONG |
Dependent Variable | PuddRemain |
Covariance Structure | Compound Symmetry |
Subject Effect | SubjectID |
Estimation Method | REML |
Residual Variance Method | Profile |
Fixed Effects SE Method | Kenward-Roger |
Degrees of Freedom Method | Kenward-Roger |
Class Level Information | ||
---|---|---|
Class | Levels | Values |
SubjectID | 34 | 1 2 4 5 6 7 9 10 11 12 13 14 16 17 18 20 22 23 24 26 28 29 31 32 34 35 36 37 38 39 40 42 43 44 |
OrderAssigned | 2 | HighLow LowHigh |
Gender | 2 | Female Male |
VisitType | 2 | End Start |
Interventionwk | 2 | High Low |
MedsYN | 2 | N Y |
Dimensions | |
---|---|
Covariance Parameters | 2 |
Columns in X | 12 |
Columns in Z | 0 |
Subjects | 34 |
Max Obs per Subject | 4 |
Number of Observations | |
---|---|
Number of Observations Read | 135 |
Number of Observations Used | 130 |
Number of Observations Not Used | 5 |
Iteration History | |||
---|---|---|---|
Iteration | Evaluations | -2 Res Log Like | Criterion |
0 | 1 | 647.39004074 | |
1 | 2 | 623.78263003 | 0.00000045 |
2 | 1 | 623.78254070 | 0.00000000 |
Convergence criteria met. |
Covariance Parameter Estimates | ||
---|---|---|
Cov Parm | Subject | Estimate |
CS | SubjectID | 3.7812 |
Residual | 5.4405 |
Fit Statistics | |
---|---|
-2 Res Log Likelihood | 623.8 |
AIC (Smaller is Better) | 627.8 |
AICC (Smaller is Better) | 627.9 |
BIC (Smaller is Better) | 630.8 |
Null Model Likelihood Ratio Test | ||
---|---|---|
DF | Chi-Square | Pr > ChiSq |
1 | 23.61 | <.0001 |
Solution for Fixed Effects | ||||||||
---|---|---|---|---|---|---|---|---|
Effect | VisitType | Interventionwk | MedsYN | Estimate | Standard Error |
DF | t Value | Pr > |t| |
Intercept | 7.3503 | 0.9977 | 68.7 | 7.37 | <.0001 | |||
Interventionwk | High | 0.2898 | 0.5925 | 95 | 0.49 | 0.6259 | ||
Interventionwk | Low | 0 | . | . | . | . | ||
SalivaVolume | -1.3485 | 0.4730 | 101 | -2.85 | 0.0053 | |||
VisitType | End | 0.6694 | 0.5852 | 94 | 1.14 | 0.2556 | ||
VisitType | Start | 0 | . | . | . | . | ||
MedsYN | N | -1.1639 | 0.8301 | 32.7 | -1.40 | 0.1703 | ||
MedsYN | Y | 0 | . | . | . | . | ||
VisitType*Interventi | End | High | -0.1634 | 0.8265 | 94.1 | -0.20 | 0.8437 | |
VisitType*Interventi | End | Low | 0 | . | . | . | . | |
VisitType*Interventi | Start | High | 0 | . | . | . | . | |
VisitType*Interventi | Start | Low | 0 | . | . | . | . |
Type 3 Tests of Fixed Effects | ||||
---|---|---|---|---|
Effect | Num DF | Den DF | F Value | Pr > F |
Interventionwk | 1 | 94.5 | 0.25 | 0.6164 |
SalivaVolume | 1 | 101 | 8.13 | 0.0053 |
VisitType | 1 | 93.3 | 2.04 | 0.1563 |
MedsYN | 1 | 32.7 | 1.97 | 0.1703 |
VisitType*Interventi | 1 | 94.1 | 0.04 | 0.8437 |
Least Squares Means | |||||||
---|---|---|---|---|---|---|---|
Effect | VisitType | Interventionwk | Estimate | Standard Error |
DF | t Value | Pr > |t| |
VisitType | End | 5.7378 | 0.4597 | 48.6 | 12.48 | <.0001 | |
VisitType | Start | 5.1502 | 0.4617 | 49.3 | 11.16 | <.0001 | |
Interventionwk | High | 5.5480 | 0.4637 | 49.5 | 11.97 | <.0001 | |
Interventionwk | Low | 5.3399 | 0.4589 | 48.5 | 11.64 | <.0001 | |
VisitType*Interventi | End | High | 5.8010 | 0.5497 | 82.9 | 10.55 | <.0001 |
VisitType*Interventi | End | Low | 5.6746 | 0.5359 | 78.5 | 10.59 | <.0001 |
VisitType*Interventi | Start | High | 5.2951 | 0.5445 | 80.6 | 9.73 | <.0001 |
VisitType*Interventi | Start | Low | 5.0053 | 0.5526 | 84.1 | 9.06 | <.0001 |
Differences of Least Squares Means | |||||||||
---|---|---|---|---|---|---|---|---|---|
Effect | VisitType | Interventionwk | _VisitType | _Interventionwk | Estimate | Standard Error |
DF | t Value | Pr > |t| |
VisitType | End | Start | 0.5876 | 0.4112 | 93.3 | 1.43 | 0.1563 | ||
Interventionwk | High | Low | 0.2081 | 0.4140 | 94.5 | 0.50 | 0.6164 | ||
VisitType*Interventi | End | High | End | Low | 0.1264 | 0.5773 | 93.6 | 0.22 | 0.8272 |
VisitType*Interventi | End | High | Start | High | 0.5059 | 0.5807 | 93.4 | 0.87 | 0.3859 |
VisitType*Interventi | End | High | Start | Low | 0.7957 | 0.5952 | 94.5 | 1.34 | 0.1845 |
VisitType*Interventi | End | Low | Start | High | 0.3795 | 0.5715 | 93.3 | 0.66 | 0.5083 |
VisitType*Interventi | End | Low | Start | Low | 0.6694 | 0.5852 | 94 | 1.14 | 0.2556 |
VisitType*Interventi | Start | High | Start | Low | 0.2898 | 0.5925 | 95 | 0.49 | 0.6259 |
The Mixed Procedure
Model Information | |
---|---|
Data Set | WORK.PUDDLONG |
Dependent Variable | PuddRemain |
Covariance Structure | Compound Symmetry |
Subject Effect | SubjectID |
Estimation Method | REML |
Residual Variance Method | Profile |
Fixed Effects SE Method | Kenward-Roger |
Degrees of Freedom Method | Kenward-Roger |
Class Level Information | ||
---|---|---|
Class | Levels | Values |
SubjectID | 34 | 1 2 4 5 6 7 9 10 11 12 13 14 16 17 18 20 22 23 24 26 28 29 31 32 34 35 36 37 38 39 40 42 43 44 |
OrderAssigned | 2 | HighLow LowHigh |
Gender | 2 | Female Male |
VisitType | 2 | End Start |
Interventionwk | 2 | High Low |
MedsYN | 2 | N Y |
Dimensions | |
---|---|
Covariance Parameters | 2 |
Columns in X | 12 |
Columns in Z | 0 |
Subjects | 34 |
Max Obs per Subject | 4 |
Number of Observations | |
---|---|
Number of Observations Read | 135 |
Number of Observations Used | 130 |
Number of Observations Not Used | 5 |
Iteration History | |||
---|---|---|---|
Iteration | Evaluations | -2 Res Log Like | Criterion |
0 | 1 | 586.62531669 | |
1 | 2 | 556.45787100 | 0.00000003 |
2 | 1 | 556.45786536 | 0.00000000 |
Convergence criteria met. |
Covariance Parameter Estimates | ||
---|---|---|
Cov Parm | Subject | Estimate |
CS | SubjectID | 2.7148 |
Residual | 3.0075 |
Fit Statistics | |
---|---|
-2 Res Log Likelihood | 556.5 |
AIC (Smaller is Better) | 560.5 |
AICC (Smaller is Better) | 560.6 |
BIC (Smaller is Better) | 563.5 |
Null Model Likelihood Ratio Test | ||
---|---|---|
DF | Chi-Square | Pr > ChiSq |
1 | 30.17 | <.0001 |
Solution for Fixed Effects | ||||||||
---|---|---|---|---|---|---|---|---|
Effect | VisitType | Interventionwk | MedsYN | Estimate | Standard Error |
DF | t Value | Pr > |t| |
Intercept | 8.7414 | 0.7903 | 66.8 | 11.06 | <.0001 | |||
Interventionwk | High | 0.4058 | 0.4410 | 93.6 | 0.92 | 0.3598 | ||
Interventionwk | Low | 0 | . | . | . | . | ||
SalivaVolume | -0.9213 | 0.3674 | 109 | -2.51 | 0.0136 | |||
VisitType | End | 0.8480 | 0.4354 | 92.7 | 1.95 | 0.0545 | ||
VisitType | Start | 0 | . | . | . | . | ||
MedsYN | N | -1.2321 | 0.6798 | 31.5 | -1.81 | 0.0794 | ||
MedsYN | Y | 0 | . | . | . | . | ||
VisitType*Interventi | End | High | -0.5387 | 0.6149 | 92.8 | -0.88 | 0.3833 | |
VisitType*Interventi | End | Low | 0 | . | . | . | . | |
VisitType*Interventi | Start | High | 0 | . | . | . | . | |
VisitType*Interventi | Start | Low | 0 | . | . | . | . |
Type 3 Tests of Fixed Effects | ||||
---|---|---|---|---|
Effect | Num DF | Den DF | F Value | Pr > F |
Interventionwk | 1 | 93.1 | 0.20 | 0.6588 |
SalivaVolume | 1 | 109 | 6.29 | 0.0136 |
VisitType | 1 | 92 | 3.58 | 0.0616 |
MedsYN | 1 | 31.5 | 3.29 | 0.0794 |
VisitType*Interventi | 1 | 92.8 | 0.77 | 0.3833 |
Least Squares Means | |||||||
---|---|---|---|---|---|---|---|
Effect | VisitType | Interventionwk | Estimate | Standard Error |
DF | t Value | Pr > |t| |
VisitType | End | 7.7023 | 0.3702 | 44.3 | 20.81 | <.0001 | |
VisitType | Start | 7.1237 | 0.3715 | 44.8 | 19.17 | <.0001 | |
Interventionwk | High | 7.4812 | 0.3730 | 45.1 | 20.06 | <.0001 | |
Interventionwk | Low | 7.3448 | 0.3696 | 44.2 | 19.87 | <.0001 | |
VisitType*Interventi | End | High | 7.6359 | 0.4328 | 73.6 | 17.64 | <.0001 |
VisitType*Interventi | End | Low | 7.7688 | 0.4230 | 69.4 | 18.37 | <.0001 |
VisitType*Interventi | Start | High | 7.3266 | 0.4292 | 71.5 | 17.07 | <.0001 |
VisitType*Interventi | Start | Low | 6.9208 | 0.4348 | 74.7 | 15.92 | <.0001 |
Differences of Least Squares Means | |||||||||
---|---|---|---|---|---|---|---|---|---|
Effect | VisitType | Interventionwk | _VisitType | _Interventionwk | Estimate | Standard Error |
DF | t Value | Pr > |t| |
VisitType | End | Start | 0.5786 | 0.3058 | 92 | 1.89 | 0.0616 | ||
Interventionwk | High | Low | 0.1364 | 0.3080 | 93.1 | 0.44 | 0.6588 | ||
VisitType*Interventi | End | High | End | Low | -0.1329 | 0.4294 | 92.3 | -0.31 | 0.7576 |
VisitType*Interventi | End | High | Start | High | 0.3093 | 0.4319 | 92.2 | 0.72 | 0.4757 |
VisitType*Interventi | End | High | Start | Low | 0.7151 | 0.4429 | 93.1 | 1.61 | 0.1098 |
VisitType*Interventi | End | Low | Start | High | 0.4422 | 0.4250 | 92 | 1.04 | 0.3009 |
VisitType*Interventi | End | Low | Start | Low | 0.8480 | 0.4354 | 92.7 | 1.95 | 0.0545 |
VisitType*Interventi | Start | High | Start | Low | 0.4058 | 0.4410 | 93.6 | 0.92 | 0.3598 |
PuddDiff = sas.sd2df('diff1')
PuddTests = sas.sd2df('tests1')
PuddMeans = sas.sd2df('means1')
PuddDiff.to_csv('./out/PuddDiff.csv')
PuddTests.to_csv('./out/PuddTests.csv')
PuddMeans.to_csv('./out/PuddMeans.csv')
starchsasrun = sas.df2sd(starchall, 'starchsas')
Code from below adapted to each, removing non-significant effects one by one (started with interactions, then main effects)
%%SAS sas
proc sort data = starchsas; by interventionwk Shortname orderassigned subjectID; run;
title 'General model start test MB'; copy this one;
ods output diffs = diff2 tests3=tests2 lsmeans =means2
lsmESTIMATEs =Estim2 SolutionF= sol2;
Proc mixed data=starchsas;
by interventionwk;
class subjectID orderassigned gender visittype interventionwk taste smell foodtype mbstory mbpicture;
model Sweetness = Taste Smell Pudding40s Visittype FoodType MBStory
pudding40svisittype foodtypevisittype MBStoryFoodtype
/ ddfm = kr solution residual; ; removed ;
repeated / subject = subjectID type = cs;
lsmeans visittype / pdiff ADJDFE=ROW;lsmeans Taste/ pdiff ADJDFE=ROW;
lsmeans smell/ pdiff ADJDFE=ROW;lsmeans foodtype/ pdiff ADJDFE=ROW;
run;
%%SAS sas
proc sort data = starchsas;
by interventionwk Shortname orderassigned subjectID;
run;
title 'Sweetness Final';
ods output diffs = diffsw tests3=testssw lsmeans =meanssw
lsmESTIMATEs =Estimsw SolutionF= solsw;
Proc mixed data=starchsas;
by interventionwk;
class subjectID orderassigned gender visittype interventionwk taste smell foodtype mbstory mbpicture;
model Sweetness = Taste FoodType
/ ddfm = kr solution; *; *removed MBStory*Foodtype pudding40s*visittype foodtype*visittype Pudding40s Smell Visittype MBStory ;
repeated / subject = subjectID type = cs;
lsmeans Taste/ pdiff ADJDFE=ROW;
lsmeans foodtype/ pdiff ADJDFE=ROW;
run;
The Mixed Procedure
Model Information | |
---|---|
Data Set | WORK.STARCHSAS |
Dependent Variable | Sweetness |
Covariance Structure | Compound Symmetry |
Subject Effect | SubjectID |
Estimation Method | REML |
Residual Variance Method | Profile |
Fixed Effects SE Method | Kenward-Roger |
Degrees of Freedom Method | Kenward-Roger |
Class Level Information | ||
---|---|---|
Class | Levels | Values |
SubjectID | 41 | 1 2 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 42 43 44 |
OrderAssigned | 2 | HighLow LowHigh |
Gender | 2 | Female Male |
VisitType | 2 | End Start |
Interventionwk | 1 | High |
Taste | 2 | Fail Pass |
Smell | 2 | Fail Pass |
FoodType | 2 | HighS LowS |
MBStory | 4 | Chewer Cruncher Smoosher Sucker |
MBPicture | 4 | Chewer Cruncher Smoosher Sucker |
Dimensions | |
---|---|
Covariance Parameters | 2 |
Columns in X | 5 |
Columns in Z | 0 |
Subjects | 41 |
Max Obs per Subject | 24 |
Number of Observations | |
---|---|
Number of Observations Read | 947 |
Number of Observations Used | 936 |
Number of Observations Not Used | 11 |
Iteration History | |||
---|---|---|---|
Iteration | Evaluations | -2 Res Log Like | Criterion |
0 | 1 | 8593.77159170 | |
1 | 2 | 8548.35583740 | 0.00000000 |
Convergence criteria met. |
Covariance Parameter Estimates | ||
---|---|---|
Cov Parm | Subject | Estimate |
CS | SubjectID | 57.3302 |
Residual | 520.08 |
Fit Statistics | |
---|---|
-2 Res Log Likelihood | 8548.4 |
AIC (Smaller is Better) | 8552.4 |
AICC (Smaller is Better) | 8552.4 |
BIC (Smaller is Better) | 8555.8 |
Null Model Likelihood Ratio Test | ||
---|---|---|
DF | Chi-Square | Pr > ChiSq |
1 | 45.42 | <.0001 |
Solution for Fixed Effects | |||||||
---|---|---|---|---|---|---|---|
Effect | Taste | FoodType | Estimate | Standard Error |
DF | t Value | Pr > |t| |
Intercept | 55.4306 | 1.6518 | 63.8 | 33.56 | <.0001 | ||
Taste | Fail | -7.9940 | 4.2308 | 64.5 | -1.89 | 0.0633 | |
Taste | Pass | 0 | . | . | . | . | |
FoodType | HighS | -6.9808 | 1.4908 | 894 | -4.68 | <.0001 | |
FoodType | LowS | 0 | . | . | . | . |
Type 3 Tests of Fixed Effects | ||||
---|---|---|---|---|
Effect | Num DF | Den DF | F Value | Pr > F |
Taste | 1 | 64.5 | 3.57 | 0.0633 |
FoodType | 1 | 894 | 21.93 | <.0001 |
Least Squares Means | |||||||
---|---|---|---|---|---|---|---|
Effect | Taste | FoodType | Estimate | Standard Error |
DF | t Value | Pr > |t| |
Taste | Fail | 43.9462 | 4.0312 | 61 | 10.90 | <.0001 | |
Taste | Pass | 51.9402 | 1.4741 | 40.6 | 35.24 | <.0001 | |
FoodType | HighS | 44.4528 | 2.3005 | 65.5 | 19.32 | <.0001 | |
FoodType | LowS | 51.4336 | 2.3005 | 65.5 | 22.36 | <.0001 |
Differences of Least Squares Means | |||||||||
---|---|---|---|---|---|---|---|---|---|
Effect | Taste | FoodType | _Taste | _FoodType | Estimate | Standard Error |
DF | t Value | Pr > |t| |
Taste | Fail | Pass | -7.9940 | 4.2308 | 64.5 | -1.89 | 0.0633 | ||
FoodType | HighS | LowS | -6.9808 | 1.4908 | 894 | -4.68 | <.0001 |
The Mixed Procedure
Model Information | |
---|---|
Data Set | WORK.STARCHSAS |
Dependent Variable | Sweetness |
Covariance Structure | Compound Symmetry |
Subject Effect | SubjectID |
Estimation Method | REML |
Residual Variance Method | Profile |
Fixed Effects SE Method | Kenward-Roger |
Degrees of Freedom Method | Kenward-Roger |
Class Level Information | ||
---|---|---|
Class | Levels | Values |
SubjectID | 38 | 1 2 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 22 23 24 26 28 29 30 31 32 34 35 36 37 38 39 40 42 43 44 |
OrderAssigned | 2 | HighLow LowHigh |
Gender | 2 | Female Male |
VisitType | 2 | End Start |
Interventionwk | 1 | Low |
Taste | 2 | Fail Pass |
Smell | 2 | Fail Pass |
FoodType | 2 | HighS LowS |
MBStory | 4 | Chewer Cruncher Smoosher Sucker |
MBPicture | 4 | Chewer Cruncher Smoosher Sucker |
Dimensions | |
---|---|
Covariance Parameters | 2 |
Columns in X | 5 |
Columns in Z | 0 |
Subjects | 38 |
Max Obs per Subject | 24 |
Number of Observations | |
---|---|
Number of Observations Read | 900 |
Number of Observations Used | 900 |
Number of Observations Not Used | 0 |
Iteration History | |||
---|---|---|---|
Iteration | Evaluations | -2 Res Log Like | Criterion |
0 | 1 | 8294.66691757 | |
1 | 2 | 8215.32792062 | 0.00000002 |
2 | 1 | 8215.32786582 | 0.00000000 |
Convergence criteria met. |
Covariance Parameter Estimates | ||
---|---|---|
Cov Parm | Subject | Estimate |
CS | SubjectID | 87.2743 |
Residual | 510.77 |
Fit Statistics | |
---|---|
-2 Res Log Likelihood | 8215.3 |
AIC (Smaller is Better) | 8219.3 |
AICC (Smaller is Better) | 8219.3 |
BIC (Smaller is Better) | 8222.6 |
Null Model Likelihood Ratio Test | ||
---|---|---|
DF | Chi-Square | Pr > ChiSq |
1 | 79.34 | <.0001 |
Solution for Fixed Effects | |||||||
---|---|---|---|---|---|---|---|
Effect | Taste | FoodType | Estimate | Standard Error |
DF | t Value | Pr > |t| |
Intercept | 56.7509 | 1.9097 | 57.8 | 29.72 | <.0001 | ||
Taste | Fail | -0.8929 | 2.8908 | 470 | -0.31 | 0.7576 | |
Taste | Pass | 0 | . | . | . | . | |
FoodType | HighS | -8.9356 | 1.5067 | 861 | -5.93 | <.0001 | |
FoodType | LowS | 0 | . | . | . | . |
Type 3 Tests of Fixed Effects | ||||
---|---|---|---|---|
Effect | Num DF | Den DF | F Value | Pr > F |
Taste | 1 | 470 | 0.10 | 0.7576 |
FoodType | 1 | 861 | 35.17 | <.0001 |
Least Squares Means | |||||||
---|---|---|---|---|---|---|---|
Effect | Taste | FoodType | Estimate | Standard Error |
DF | t Value | Pr > |t| |
Taste | Fail | 51.3902 | 2.9642 | 150 | 17.34 | <.0001 | |
Taste | Pass | 52.2831 | 1.7548 | 41.3 | 29.79 | <.0001 | |
FoodType | HighS | 47.3689 | 2.1003 | 74.2 | 22.55 | <.0001 | |
FoodType | LowS | 56.3044 | 2.1003 | 74.2 | 26.81 | <.0001 |
Differences of Least Squares Means | |||||||||
---|---|---|---|---|---|---|---|---|---|
Effect | Taste | FoodType | _Taste | _FoodType | Estimate | Standard Error |
DF | t Value | Pr > |t| |
Taste | Fail | Pass | -0.8929 | 2.8908 | 470 | -0.31 | 0.7576 | ||
FoodType | HighS | LowS | -8.9356 | 1.5067 | 861 | -5.93 | <.0001 |
%%SAS sas
proc sort data = starchsas;
by interventionwk Shortname orderassigned subjectID;
run;
title 'Hardness Final';
ods output diffs = diffha tests3=testsha lsmeans =meansha
lsmESTIMATEs =Estimha SolutionF= solha;
Proc mixed data=starchsas;
by interventionwk;
class subjectID orderassigned gender visittype interventionwk taste smell foodtype mbstory mbpicture;
model hardness = Visittype FoodType MBStory
MBStory*Foodtype
/ ddfm = kr solution; *solution residual; *removed pudding40s*visittype foodtype*visittype Smell Pudding40s Taste ;
repeated / subject = subjectID type = cs;
lsmeans visittype / pdiff ADJDFE=ROW;
lsmeans foodtype/ pdiff ADJDFE=ROW;
lsmeans mbstory/ pdiff ADJDFE=ROW;
lsmeans mbstory*foodtype/ pdiff ADJDFE=ROW;
run;
The Mixed Procedure
Model Information | |
---|---|
Data Set | WORK.STARCHSAS |
Dependent Variable | Hardness |
Covariance Structure | Compound Symmetry |
Subject Effect | SubjectID |
Estimation Method | REML |
Residual Variance Method | Profile |
Fixed Effects SE Method | Kenward-Roger |
Degrees of Freedom Method | Kenward-Roger |
Class Level Information | ||
---|---|---|
Class | Levels | Values |
SubjectID | 41 | 1 2 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 42 43 44 |
OrderAssigned | 2 | HighLow LowHigh |
Gender | 2 | Female Male |
VisitType | 2 | End Start |
Interventionwk | 1 | High |
Taste | 2 | Fail Pass |
Smell | 2 | Fail Pass |
FoodType | 2 | HighS LowS |
MBStory | 4 | Chewer Cruncher Smoosher Sucker |
MBPicture | 4 | Chewer Cruncher Smoosher Sucker |
Dimensions | |
---|---|
Covariance Parameters | 2 |
Columns in X | 17 |
Columns in Z | 0 |
Subjects | 41 |
Max Obs per Subject | 24 |
Number of Observations | |
---|---|
Number of Observations Read | 947 |
Number of Observations Used | 936 |
Number of Observations Not Used | 11 |
Iteration History | |||
---|---|---|---|
Iteration | Evaluations | -2 Res Log Like | Criterion |
0 | 1 | 8374.97539012 | |
1 | 2 | 8224.63538650 | 0.00000042 |
2 | 1 | 8224.63401294 | 0.00000000 |
Convergence criteria met. |
Covariance Parameter Estimates | ||
---|---|---|
Cov Parm | Subject | Estimate |
CS | SubjectID | 106.58 |
Residual | 367.41 |
Fit Statistics | |
---|---|
-2 Res Log Likelihood | 8224.6 |
AIC (Smaller is Better) | 8228.6 |
AICC (Smaller is Better) | 8228.6 |
BIC (Smaller is Better) | 8232.1 |
Null Model Likelihood Ratio Test | ||
---|---|---|
DF | Chi-Square | Pr > ChiSq |
1 | 150.34 | <.0001 |
Solution for Fixed Effects | ||||||||
---|---|---|---|---|---|---|---|---|
Effect | VisitType | FoodType | MBStory | Estimate | Standard Error |
DF | t Value | Pr > |t| |
Intercept | 60.9341 | 4.7361 | 203 | 12.87 | <.0001 | |||
VisitType | End | 2.9152 | 1.2974 | 918 | 2.25 | 0.0249 | ||
VisitType | Start | 0 | . | . | . | . | ||
FoodType | HighS | -19.1667 | 4.1828 | 889 | -4.58 | <.0001 | ||
FoodType | LowS | 0 | . | . | . | . | ||
MBStory | Chewer | -4.2571 | 5.2775 | 350 | -0.81 | 0.4204 | ||
MBStory | Cruncher | -3.0357 | 4.9736 | 285 | -0.61 | 0.5421 | ||
MBStory | Smoosher | -5.7587 | 5.9044 | 178 | -0.98 | 0.3307 | ||
MBStory | Sucker | 0 | . | . | . | . | ||
FoodType*MBStory | HighS | Chewer | 13.2353 | 4.9699 | 889 | 2.66 | 0.0079 | |
FoodType*MBStory | HighS | Cruncher | 11.1096 | 4.5518 | 889 | 2.44 | 0.0149 | |
FoodType*MBStory | HighS | Smoosher | 3.2708 | 5.0150 | 889 | 0.65 | 0.5144 | |
FoodType*MBStory | HighS | Sucker | 0 | . | . | . | . | |
FoodType*MBStory | LowS | Chewer | 0 | . | . | . | . | |
FoodType*MBStory | LowS | Cruncher | 0 | . | . | . | . | |
FoodType*MBStory | LowS | Smoosher | 0 | . | . | . | . | |
FoodType*MBStory | LowS | Sucker | 0 | . | . | . | . |
Type 3 Tests of Fixed Effects | ||||
---|---|---|---|---|
Effect | Num DF | Den DF | F Value | Pr > F |
VisitType | 1 | 918 | 5.05 | 0.0249 |
FoodType | 1 | 889 | 67.63 | <.0001 |
MBStory | 3 | 155 | 1.17 | 0.3223 |
FoodType*MBStory | 3 | 889 | 4.26 | 0.0053 |
Least Squares Means | ||||||||
---|---|---|---|---|---|---|---|---|
Effect | VisitType | FoodType | MBStory | Estimate | Standard Error |
DF | t Value | Pr > |t| |
VisitType | End | 54.4551 | 2.0097 | 60.4 | 27.10 | <.0001 | ||
VisitType | Start | 51.5399 | 1.9990 | 57.7 | 25.78 | <.0001 | ||
FoodType | HighS | 46.8661 | 2.0377 | 63.4 | 23.00 | <.0001 | ||
FoodType | LowS | 59.1288 | 2.0377 | 63.4 | 29.02 | <.0001 | ||
MBStory | Chewer | 55.1689 | 2.9416 | 90.8 | 18.75 | <.0001 | ||
MBStory | Cruncher | 55.3275 | 2.1550 | 60.7 | 25.67 | <.0001 | ||
MBStory | Smoosher | 48.6851 | 3.3756 | 72.4 | 14.42 | <.0001 | ||
MBStory | Sucker | 52.8084 | 4.2229 | 132 | 12.51 | <.0001 | ||
FoodType*MBStory | HighS | Chewer | 52.2032 | 3.2333 | 131 | 16.15 | <.0001 | |
FoodType*MBStory | HighS | Cruncher | 51.2990 | 2.3345 | 83.2 | 21.97 | <.0001 | |
FoodType*MBStory | HighS | Smoosher | 40.7372 | 3.6480 | 98.3 | 11.17 | <.0001 | |
FoodType*MBStory | HighS | Sucker | 43.2250 | 4.7124 | 198 | 9.17 | <.0001 | |
FoodType*MBStory | LowS | Chewer | 58.1346 | 3.2333 | 131 | 17.98 | <.0001 | |
FoodType*MBStory | LowS | Cruncher | 59.3560 | 2.3345 | 83.2 | 25.43 | <.0001 | |
FoodType*MBStory | LowS | Smoosher | 56.6330 | 3.6480 | 98.3 | 15.52 | <.0001 | |
FoodType*MBStory | LowS | Sucker | 62.3917 | 4.7124 | 198 | 13.24 | <.0001 |
Differences of Least Squares Means | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Effect | VisitType | FoodType | MBStory | _VisitType | _FoodType | _MBStory | Estimate | Standard Error |
DF | t Value | Pr > |t| |
VisitType | End | Start | 2.9152 | 1.2974 | 918 | 2.25 | 0.0249 | ||||
FoodType | HighS | LowS | -12.2627 | 1.4912 | 889 | -8.22 | <.0001 | ||||
MBStory | Chewer | Cruncher | -0.1586 | 3.1604 | 200 | -0.05 | 0.9600 | ||||
MBStory | Chewer | Smoosher | 6.4838 | 4.3876 | 102 | 1.48 | 0.1425 | ||||
MBStory | Chewer | Sucker | 2.3605 | 4.6559 | 234 | 0.51 | 0.6126 | ||||
MBStory | Cruncher | Smoosher | 6.6424 | 3.6752 | 115 | 1.81 | 0.0733 | ||||
MBStory | Cruncher | Sucker | 2.5192 | 4.4223 | 191 | 0.57 | 0.5696 | ||||
MBStory | Smoosher | Sucker | -4.1233 | 5.3455 | 123 | -0.77 | 0.4420 | ||||
FoodType*MBStory | HighS | Chewer | HighS | Cruncher | 0.9042 | 3.5489 | 296 | 0.25 | 0.7991 | ||
FoodType*MBStory | HighS | Chewer | HighS | Smoosher | 11.4660 | 4.7923 | 144 | 2.39 | 0.0180 | ||
FoodType*MBStory | HighS | Chewer | HighS | Sucker | 8.9782 | 5.2775 | 350 | 1.70 | 0.0898 | ||
FoodType*MBStory | HighS | Chewer | LowS | Chewer | -5.9314 | 2.6841 | 889 | -2.21 | 0.0274 | ||
FoodType*MBStory | HighS | Chewer | LowS | Cruncher | -7.1528 | 3.5489 | 296 | -2.02 | 0.0448 | ||
FoodType*MBStory | HighS | Chewer | LowS | Smoosher | -4.4298 | 4.7923 | 144 | -0.92 | 0.3568 | ||
FoodType*MBStory | HighS | Chewer | LowS | Sucker | -10.1885 | 5.2775 | 350 | -1.93 | 0.0543 | ||
FoodType*MBStory | HighS | Cruncher | HighS | Smoosher | 10.5618 | 4.0282 | 163 | 2.62 | 0.0096 | ||
FoodType*MBStory | HighS | Cruncher | HighS | Sucker | 8.0740 | 4.9736 | 285 | 1.62 | 0.1056 | ||
FoodType*MBStory | HighS | Cruncher | LowS | Chewer | -6.8356 | 3.5489 | 296 | -1.93 | 0.0551 | ||
FoodType*MBStory | HighS | Cruncher | LowS | Cruncher | -8.0570 | 1.7953 | 889 | -4.49 | <.0001 | ||
FoodType*MBStory | HighS | Cruncher | LowS | Smoosher | -5.3340 | 4.0282 | 163 | -1.32 | 0.1873 | ||
FoodType*MBStory | HighS | Cruncher | LowS | Sucker | -11.0927 | 4.9736 | 285 | -2.23 | 0.0265 | ||
FoodType*MBStory | HighS | Smoosher | HighS | Sucker | -2.4878 | 5.9044 | 178 | -0.42 | 0.6740 | ||
FoodType*MBStory | HighS | Smoosher | LowS | Chewer | -17.3974 | 4.7923 | 144 | -3.63 | 0.0004 | ||
FoodType*MBStory | HighS | Smoosher | LowS | Cruncher | -18.6188 | 4.0282 | 163 | -4.62 | <.0001 | ||
FoodType*MBStory | HighS | Smoosher | LowS | Smoosher | -15.8958 | 2.7667 | 889 | -5.75 | <.0001 | ||
FoodType*MBStory | HighS | Smoosher | LowS | Sucker | -21.6545 | 5.9044 | 178 | -3.67 | 0.0003 | ||
FoodType*MBStory | HighS | Sucker | LowS | Chewer | -14.9096 | 5.2775 | 350 | -2.83 | 0.0050 | ||
FoodType*MBStory | HighS | Sucker | LowS | Cruncher | -16.1310 | 4.9736 | 285 | -3.24 | 0.0013 | ||
FoodType*MBStory | HighS | Sucker | LowS | Smoosher | -13.4080 | 5.9044 | 178 | -2.27 | 0.0244 | ||
FoodType*MBStory | HighS | Sucker | LowS | Sucker | -19.1667 | 4.1828 | 889 | -4.58 | <.0001 | ||
FoodType*MBStory | LowS | Chewer | LowS | Cruncher | -1.2214 | 3.5489 | 296 | -0.34 | 0.7310 | ||
FoodType*MBStory | LowS | Chewer | LowS | Smoosher | 1.5016 | 4.7923 | 144 | 0.31 | 0.7545 | ||
FoodType*MBStory | LowS | Chewer | LowS | Sucker | -4.2571 | 5.2775 | 350 | -0.81 | 0.4204 | ||
FoodType*MBStory | LowS | Cruncher | LowS | Smoosher | 2.7230 | 4.0282 | 163 | 0.68 | 0.5000 | ||
FoodType*MBStory | LowS | Cruncher | LowS | Sucker | -3.0357 | 4.9736 | 285 | -0.61 | 0.5421 | ||
FoodType*MBStory | LowS | Smoosher | LowS | Sucker | -5.7587 | 5.9044 | 178 | -0.98 | 0.3307 |
The Mixed Procedure
Model Information | |
---|---|
Data Set | WORK.STARCHSAS |
Dependent Variable | Hardness |
Covariance Structure | Compound Symmetry |
Subject Effect | SubjectID |
Estimation Method | REML |
Residual Variance Method | Profile |
Fixed Effects SE Method | Kenward-Roger |
Degrees of Freedom Method | Kenward-Roger |
Class Level Information | ||
---|---|---|
Class | Levels | Values |
SubjectID | 38 | 1 2 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 22 23 24 26 28 29 30 31 32 34 35 36 37 38 39 40 42 43 44 |
OrderAssigned | 2 | HighLow LowHigh |
Gender | 2 | Female Male |
VisitType | 2 | End Start |
Interventionwk | 1 | Low |
Taste | 2 | Fail Pass |
Smell | 2 | Fail Pass |
FoodType | 2 | HighS LowS |
MBStory | 4 | Chewer Cruncher Smoosher Sucker |
MBPicture | 4 | Chewer Cruncher Smoosher Sucker |
Dimensions | |
---|---|
Covariance Parameters | 2 |
Columns in X | 17 |
Columns in Z | 0 |
Subjects | 38 |
Max Obs per Subject | 24 |
Number of Observations | |
---|---|
Number of Observations Read | 900 |
Number of Observations Used | 900 |
Number of Observations Not Used | 0 |
Iteration History | |||
---|---|---|---|
Iteration | Evaluations | -2 Res Log Like | Criterion |
0 | 1 | 8151.21959506 | |
1 | 2 | 8057.66731752 | 0.00000000 |
Convergence criteria met. |
Covariance Parameter Estimates | ||
---|---|---|
Cov Parm | Subject | Estimate |
CS | SubjectID | 90.9946 |
Residual | 441.18 |
Fit Statistics | |
---|---|
-2 Res Log Likelihood | 8057.7 |
AIC (Smaller is Better) | 8061.7 |
AICC (Smaller is Better) | 8061.7 |
BIC (Smaller is Better) | 8064.9 |
Null Model Likelihood Ratio Test | ||
---|---|---|
DF | Chi-Square | Pr > ChiSq |
1 | 93.55 | <.0001 |
Solution for Fixed Effects | ||||||||
---|---|---|---|---|---|---|---|---|
Effect | VisitType | FoodType | MBStory | Estimate | Standard Error |
DF | t Value | Pr > |t| |
Intercept | 57.7419 | 4.7732 | 240 | 12.10 | <.0001 | |||
VisitType | End | -1.0071 | 1.4242 | 880 | -0.71 | 0.4797 | ||
VisitType | Start | 0 | . | . | . | . | ||
FoodType | HighS | -7.9524 | 4.5835 | 856 | -1.74 | 0.0831 | ||
FoodType | LowS | 0 | . | . | . | . | ||
MBStory | Chewer | -2.7817 | 6.0179 | 183 | -0.46 | 0.6445 | ||
MBStory | Cruncher | 1.8186 | 4.9161 | 363 | 0.37 | 0.7117 | ||
MBStory | Smoosher | -2.6646 | 5.4795 | 275 | -0.49 | 0.6272 | ||
MBStory | Sucker | 0 | . | . | . | . | ||
FoodType*MBStory | HighS | Chewer | -0.07143 | 5.6136 | 856 | -0.01 | 0.9899 | |
FoodType*MBStory | HighS | Cruncher | -1.4597 | 5.0093 | 856 | -0.29 | 0.7708 | |
FoodType*MBStory | HighS | Smoosher | -3.6310 | 5.4017 | 856 | -0.67 | 0.5016 | |
FoodType*MBStory | HighS | Sucker | 0 | . | . | . | . | |
FoodType*MBStory | LowS | Chewer | 0 | . | . | . | . | |
FoodType*MBStory | LowS | Cruncher | 0 | . | . | . | . | |
FoodType*MBStory | LowS | Smoosher | 0 | . | . | . | . | |
FoodType*MBStory | LowS | Sucker | 0 | . | . | . | . |
Type 3 Tests of Fixed Effects | ||||
---|---|---|---|---|
Effect | Num DF | Den DF | F Value | Pr > F |
VisitType | 1 | 880 | 0.50 | 0.4797 |
FoodType | 1 | 856 | 31.23 | <.0001 |
MBStory | 3 | 105 | 0.94 | 0.4231 |
FoodType*MBStory | 3 | 856 | 0.28 | 0.8365 |
Least Squares Means | ||||||||
---|---|---|---|---|---|---|---|---|
Effect | VisitType | FoodType | MBStory | Estimate | Standard Error |
DF | t Value | Pr > |t| |
VisitType | End | 51.2064 | 1.9951 | 56.4 | 25.67 | <.0001 | ||
VisitType | Start | 52.2135 | 1.9908 | 56.6 | 26.23 | <.0001 | ||
FoodType | HighS | 47.0885 | 2.0368 | 62 | 23.12 | <.0001 | ||
FoodType | LowS | 56.3314 | 2.0368 | 62 | 27.66 | <.0001 | ||
MBStory | Chewer | 50.4447 | 3.5061 | 62.3 | 14.39 | <.0001 | ||
MBStory | Cruncher | 54.3508 | 2.2027 | 51.8 | 24.67 | <.0001 | ||
MBStory | Smoosher | 48.7820 | 3.1593 | 55.3 | 15.44 | <.0001 | ||
MBStory | Sucker | 53.2621 | 4.0694 | 143 | 13.09 | <.0001 | ||
FoodType*MBStory | HighS | Chewer | 46.4328 | 3.8625 | 91.4 | 12.02 | <.0001 | |
FoodType*MBStory | HighS | Cruncher | 49.6448 | 2.4235 | 75.6 | 20.49 | <.0001 | |
FoodType*MBStory | HighS | Smoosher | 42.9904 | 3.4676 | 80.1 | 12.40 | <.0001 | |
FoodType*MBStory | HighS | Sucker | 49.2859 | 4.6703 | 234 | 10.55 | <.0001 | |
FoodType*MBStory | LowS | Chewer | 54.4566 | 3.8625 | 91.4 | 14.10 | <.0001 | |
FoodType*MBStory | LowS | Cruncher | 59.0569 | 2.4235 | 75.6 | 24.37 | <.0001 | |
FoodType*MBStory | LowS | Smoosher | 54.5737 | 3.4676 | 80.1 | 15.74 | <.0001 | |
FoodType*MBStory | LowS | Sucker | 57.2383 | 4.6703 | 234 | 12.26 | <.0001 |
Differences of Least Squares Means | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Effect | VisitType | FoodType | MBStory | _VisitType | _FoodType | _MBStory | Estimate | Standard Error |
DF | t Value | Pr > |t| |
VisitType | End | Start | -1.0071 | 1.4242 | 880 | -0.71 | 0.4797 | ||||
FoodType | HighS | LowS | -9.2429 | 1.6539 | 856 | -5.59 | <.0001 | ||||
MBStory | Chewer | Cruncher | -3.9061 | 3.8459 | 93.3 | -1.02 | 0.3124 | ||||
MBStory | Chewer | Smoosher | 1.6627 | 4.6935 | 64.4 | 0.35 | 0.7243 | ||||
MBStory | Chewer | Sucker | -2.8174 | 5.3232 | 116 | -0.53 | 0.5976 | ||||
MBStory | Cruncher | Smoosher | 5.5688 | 3.6777 | 74.9 | 1.51 | 0.1342 | ||||
MBStory | Cruncher | Sucker | 1.0887 | 4.2302 | 226 | 0.26 | 0.7971 | ||||
MBStory | Smoosher | Sucker | -4.4800 | 4.7677 | 171 | -0.94 | 0.3487 | ||||
FoodType*MBStory | HighS | Chewer | HighS | Cruncher | -3.2120 | 4.2939 | 142 | -0.75 | 0.4557 | ||
FoodType*MBStory | HighS | Chewer | HighS | Smoosher | 3.4424 | 5.1669 | 94.2 | 0.67 | 0.5069 | ||
FoodType*MBStory | HighS | Chewer | HighS | Sucker | -2.8531 | 6.0179 | 183 | -0.47 | 0.6360 | ||
FoodType*MBStory | HighS | Chewer | LowS | Chewer | -8.0238 | 3.2410 | 856 | -2.48 | 0.0135 | ||
FoodType*MBStory | HighS | Chewer | LowS | Cruncher | -12.6240 | 4.2939 | 142 | -2.94 | 0.0038 | ||
FoodType*MBStory | HighS | Chewer | LowS | Smoosher | -8.1409 | 5.1669 | 94.2 | -1.58 | 0.1185 | ||
FoodType*MBStory | HighS | Chewer | LowS | Sucker | -10.8055 | 6.0179 | 183 | -1.80 | 0.0742 | ||
FoodType*MBStory | HighS | Cruncher | HighS | Smoosher | 6.6544 | 4.0730 | 112 | 1.63 | 0.1051 | ||
FoodType*MBStory | HighS | Cruncher | HighS | Sucker | 0.3589 | 4.9161 | 363 | 0.07 | 0.9418 | ||
FoodType*MBStory | HighS | Cruncher | LowS | Chewer | -4.8118 | 4.2939 | 142 | -1.12 | 0.2643 | ||
FoodType*MBStory | HighS | Cruncher | LowS | Cruncher | -9.4120 | 2.0211 | 856 | -4.66 | <.0001 | ||
FoodType*MBStory | HighS | Cruncher | LowS | Smoosher | -4.9289 | 4.0730 | 112 | -1.21 | 0.2288 | ||
FoodType*MBStory | HighS | Cruncher | LowS | Sucker | -7.5935 | 4.9161 | 363 | -1.54 | 0.1233 | ||
FoodType*MBStory | HighS | Smoosher | HighS | Sucker | -6.2955 | 5.4795 | 275 | -1.15 | 0.2516 | ||
FoodType*MBStory | HighS | Smoosher | LowS | Chewer | -11.4662 | 5.1669 | 94.2 | -2.22 | 0.0289 | ||
FoodType*MBStory | HighS | Smoosher | LowS | Cruncher | -16.0665 | 4.0730 | 112 | -3.94 | 0.0001 | ||
FoodType*MBStory | HighS | Smoosher | LowS | Smoosher | -11.5833 | 2.8583 | 856 | -4.05 | <.0001 | ||
FoodType*MBStory | HighS | Smoosher | LowS | Sucker | -14.2479 | 5.4795 | 275 | -2.60 | 0.0098 | ||
FoodType*MBStory | HighS | Sucker | LowS | Chewer | -5.1707 | 6.0179 | 183 | -0.86 | 0.3913 | ||
FoodType*MBStory | HighS | Sucker | LowS | Cruncher | -9.7710 | 4.9161 | 363 | -1.99 | 0.0476 | ||
FoodType*MBStory | HighS | Sucker | LowS | Smoosher | -5.2878 | 5.4795 | 275 | -0.97 | 0.3354 | ||
FoodType*MBStory | HighS | Sucker | LowS | Sucker | -7.9524 | 4.5835 | 856 | -1.74 | 0.0831 | ||
FoodType*MBStory | LowS | Chewer | LowS | Cruncher | -4.6002 | 4.2939 | 142 | -1.07 | 0.2858 | ||
FoodType*MBStory | LowS | Chewer | LowS | Smoosher | -0.1171 | 5.1669 | 94.2 | -0.02 | 0.9820 | ||
FoodType*MBStory | LowS | Chewer | LowS | Sucker | -2.7817 | 6.0179 | 183 | -0.46 | 0.6445 | ||
FoodType*MBStory | LowS | Cruncher | LowS | Smoosher | 4.4831 | 4.0730 | 112 | 1.10 | 0.2734 | ||
FoodType*MBStory | LowS | Cruncher | LowS | Sucker | 1.8186 | 4.9161 | 363 | 0.37 | 0.7117 | ||
FoodType*MBStory | LowS | Smoosher | LowS | Sucker | -2.6646 | 5.4795 | 275 | -0.49 | 0.6272 |
%%SAS sas
proc sort data = starchsas;
by interventionwk Shortname orderassigned subjectID;
run;
title 'Chewiness final';
ods output diffs = diffch tests3=testsch lsmeans =meansch
lsmESTIMATEs =Estimch SolutionF= solch;
Proc mixed data=starchsas;
by interventionwk;
class subjectID orderassigned gender visittype interventionwk taste smell foodtype mbstory mbpicture;
model Chewiness = Pudding40s MBStory
/ ddfm = kr ; *solution residual; *removed pudding40s*visittype MBStory*Foodtype foodtype*visittype Visittype FoodType Smell Taste ;
repeated / subject = subjectID type = cs;
lsmeans MBStory / pdiff ADJDFE=ROW;
run;
The Mixed Procedure
Model Information | |
---|---|
Data Set | WORK.STARCHSAS |
Dependent Variable | Chewiness |
Covariance Structure | Compound Symmetry |
Subject Effect | SubjectID |
Estimation Method | REML |
Residual Variance Method | Profile |
Fixed Effects SE Method | Kenward-Roger |
Degrees of Freedom Method | Kenward-Roger |
Class Level Information | ||
---|---|---|
Class | Levels | Values |
SubjectID | 41 | 1 2 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 42 43 44 |
OrderAssigned | 2 | HighLow LowHigh |
Gender | 2 | Female Male |
VisitType | 2 | End Start |
Interventionwk | 1 | High |
Taste | 2 | Fail Pass |
Smell | 2 | Fail Pass |
FoodType | 2 | HighS LowS |
MBStory | 4 | Chewer Cruncher Smoosher Sucker |
MBPicture | 4 | Chewer Cruncher Smoosher Sucker |
Dimensions | |
---|---|
Covariance Parameters | 2 |
Columns in X | 6 |
Columns in Z | 0 |
Subjects | 41 |
Max Obs per Subject | 24 |
Number of Observations | |
---|---|
Number of Observations Read | 947 |
Number of Observations Used | 936 |
Number of Observations Not Used | 11 |
Iteration History | |||
---|---|---|---|
Iteration | Evaluations | -2 Res Log Like | Criterion |
0 | 1 | 8400.57566016 | |
1 | 2 | 8318.00417520 | 0.00000122 |
2 | 1 | 8318.00007061 | 0.00000000 |
Convergence criteria met. |
Covariance Parameter Estimates | ||
---|---|---|
Cov Parm | Subject | Estimate |
CS | SubjectID | 79.2551 |
Residual | 402.22 |
Fit Statistics | |
---|---|
-2 Res Log Likelihood | 8318.0 |
AIC (Smaller is Better) | 8322.0 |
AICC (Smaller is Better) | 8322.0 |
BIC (Smaller is Better) | 8325.4 |
Null Model Likelihood Ratio Test | ||
---|---|---|
DF | Chi-Square | Pr > ChiSq |
1 | 82.58 | <.0001 |
Type 3 Tests of Fixed Effects | ||||
---|---|---|---|---|
Effect | Num DF | Den DF | F Value | Pr > F |
Pudding40s | 1 | 145 | 1.95 | 0.1649 |
MBStory | 3 | 120 | 2.12 | 0.1009 |
Least Squares Means | ||||||
---|---|---|---|---|---|---|
Effect | MBStory | Estimate | Standard Error |
DF | t Value | Pr > |t| |
MBStory | Chewer | 51.2401 | 2.7870 | 84.1 | 18.39 | <.0001 |
MBStory | Cruncher | 53.9994 | 1.9853 | 60 | 27.20 | <.0001 |
MBStory | Smoosher | 49.9138 | 3.1139 | 63.2 | 16.03 | <.0001 |
MBStory | Sucker | 61.5506 | 4.0724 | 103 | 15.11 | <.0001 |
Differences of Least Squares Means | |||||||
---|---|---|---|---|---|---|---|
Effect | MBStory | _MBStory | Estimate | Standard Error |
DF | t Value | Pr > |t| |
MBStory | Chewer | Cruncher | -2.7592 | 3.1274 | 171 | -0.88 | 0.3789 |
MBStory | Chewer | Smoosher | 1.3263 | 4.1087 | 79.7 | 0.32 | 0.7477 |
MBStory | Chewer | Sucker | -10.3105 | 4.6429 | 163 | -2.22 | 0.0277 |
MBStory | Cruncher | Smoosher | 4.0855 | 3.4750 | 100 | 1.18 | 0.2425 |
MBStory | Cruncher | Sucker | -7.5512 | 4.2968 | 131 | -1.76 | 0.0812 |
MBStory | Smoosher | Sucker | -11.6368 | 5.1208 | 96.2 | -2.27 | 0.0253 |
The Mixed Procedure
Model Information | |
---|---|
Data Set | WORK.STARCHSAS |
Dependent Variable | Chewiness |
Covariance Structure | Compound Symmetry |
Subject Effect | SubjectID |
Estimation Method | REML |
Residual Variance Method | Profile |
Fixed Effects SE Method | Kenward-Roger |
Degrees of Freedom Method | Kenward-Roger |
Class Level Information | ||
---|---|---|
Class | Levels | Values |
SubjectID | 38 | 1 2 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 22 23 24 26 28 29 30 31 32 34 35 36 37 38 39 40 42 43 44 |
OrderAssigned | 2 | HighLow LowHigh |
Gender | 2 | Female Male |
VisitType | 2 | End Start |
Interventionwk | 1 | Low |
Taste | 2 | Fail Pass |
Smell | 2 | Fail Pass |
FoodType | 2 | HighS LowS |
MBStory | 4 | Chewer Cruncher Smoosher Sucker |
MBPicture | 4 | Chewer Cruncher Smoosher Sucker |
Dimensions | |
---|---|
Covariance Parameters | 2 |
Columns in X | 6 |
Columns in Z | 0 |
Subjects | 38 |
Max Obs per Subject | 24 |
Number of Observations | |
---|---|
Number of Observations Read | 900 |
Number of Observations Used | 900 |
Number of Observations Not Used | 0 |
Iteration History | |||
---|---|---|---|
Iteration | Evaluations | -2 Res Log Like | Criterion |
0 | 1 | 8085.27430477 | |
1 | 2 | 8009.92159763 | 0.00000000 |
Convergence criteria met. |
Covariance Parameter Estimates | ||
---|---|---|
Cov Parm | Subject | Estimate |
CS | SubjectID | 72.3099 |
Residual | 409.80 |
Fit Statistics | |
---|---|
-2 Res Log Likelihood | 8009.9 |
AIC (Smaller is Better) | 8013.9 |
AICC (Smaller is Better) | 8013.9 |
BIC (Smaller is Better) | 8017.2 |
Null Model Likelihood Ratio Test | ||
---|---|---|
DF | Chi-Square | Pr > ChiSq |
1 | 75.35 | <.0001 |
Type 3 Tests of Fixed Effects | ||||
---|---|---|---|---|
Effect | Num DF | Den DF | F Value | Pr > F |
Pudding40s | 1 | 197 | 2.78 | 0.0968 |
MBStory | 3 | 96.5 | 1.77 | 0.1583 |
Least Squares Means | ||||||
---|---|---|---|---|---|---|
Effect | MBStory | Estimate | Standard Error |
DF | t Value | Pr > |t| |
MBStory | Chewer | 47.7483 | 3.1950 | 60.6 | 14.94 | <.0001 |
MBStory | Cruncher | 53.1726 | 2.0160 | 50.7 | 26.38 | <.0001 |
MBStory | Smoosher | 52.3759 | 2.8967 | 51.3 | 18.08 | <.0001 |
MBStory | Sucker | 58.9150 | 3.7923 | 133 | 15.54 | <.0001 |
Differences of Least Squares Means | |||||||
---|---|---|---|---|---|---|---|
Effect | MBStory | _MBStory | Estimate | Standard Error |
DF | t Value | Pr > |t| |
MBStory | Chewer | Cruncher | -5.4244 | 3.5376 | 91.1 | -1.53 | 0.1287 |
MBStory | Chewer | Smoosher | -4.6276 | 4.2871 | 59.4 | -1.08 | 0.2848 |
MBStory | Chewer | Sucker | -11.1667 | 4.9077 | 110 | -2.28 | 0.0248 |
MBStory | Cruncher | Smoosher | 0.7967 | 3.4007 | 67.8 | 0.23 | 0.8155 |
MBStory | Cruncher | Sucker | -5.7424 | 3.9724 | 200 | -1.45 | 0.1499 |
MBStory | Smoosher | Sucker | -6.5391 | 4.4628 | 147 | -1.47 | 0.1450 |
%%SAS sas
proc sort data = starchsas;
by interventionwk Shortname orderassigned subjectID;
run;
title 'Texture Liking Final';
ods output diffs = diffte tests3=testste lsmeans =meanste
lsmESTIMATEs =Estimte SolutionF= solte;
Proc mixed data=starchsas;
by interventionwk;
class subjectID orderassigned gender visittype interventionwk taste smell foodtype mbstory mbpicture;
model TextureL = FoodType MBStory MBStory*Foodtype
/ ddfm = kr solution; * residual; *removed foodtype*visittype pudding40s*visittype Visittype Smell Taste Pudding40s ;
repeated / subject = subjectID type = cs;
lsmeans foodtype / pdiff ADJDFE=ROW;
lsmeans mbstory/ pdiff ADJDFE=ROW;
lsmeans MBStory*Foodtype/ pdiff ADJDFE=ROW;
run;
The Mixed Procedure
Model Information | |
---|---|
Data Set | WORK.STARCHSAS |
Dependent Variable | TextureL |
Covariance Structure | Compound Symmetry |
Subject Effect | SubjectID |
Estimation Method | REML |
Residual Variance Method | Profile |
Fixed Effects SE Method | Kenward-Roger |
Degrees of Freedom Method | Kenward-Roger |
Class Level Information | ||
---|---|---|
Class | Levels | Values |
SubjectID | 41 | 1 2 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 42 43 44 |
OrderAssigned | 2 | HighLow LowHigh |
Gender | 2 | Female Male |
VisitType | 2 | End Start |
Interventionwk | 1 | High |
Taste | 2 | Fail Pass |
Smell | 2 | Fail Pass |
FoodType | 2 | HighS LowS |
MBStory | 4 | Chewer Cruncher Smoosher Sucker |
MBPicture | 4 | Chewer Cruncher Smoosher Sucker |
Dimensions | |
---|---|
Covariance Parameters | 2 |
Columns in X | 15 |
Columns in Z | 0 |
Subjects | 41 |
Max Obs per Subject | 24 |
Number of Observations | |
---|---|
Number of Observations Read | 947 |
Number of Observations Used | 936 |
Number of Observations Not Used | 11 |
Iteration History | |||
---|---|---|---|
Iteration | Evaluations | -2 Res Log Like | Criterion |
0 | 1 | 9510.99596613 | |
1 | 2 | 9449.82536208 | 0.00000008 |
2 | 1 | 9449.82504756 | 0.00000000 |
Convergence criteria met. |
Covariance Parameter Estimates | ||
---|---|---|
Cov Parm | Subject | Estimate |
CS | SubjectID | 195.98 |
Residual | 1404.96 |
Fit Statistics | |
---|---|
-2 Res Log Likelihood | 9449.8 |
AIC (Smaller is Better) | 9453.8 |
AICC (Smaller is Better) | 9453.8 |
BIC (Smaller is Better) | 9457.3 |
Null Model Likelihood Ratio Test | ||
---|---|---|
DF | Chi-Square | Pr > ChiSq |
1 | 61.17 | <.0001 |
Solution for Fixed Effects | |||||||
---|---|---|---|---|---|---|---|
Effect | FoodType | MBStory | Estimate | Standard Error |
DF | t Value | Pr > |t| |
Intercept | 20.2272 | 8.0603 | 173 | 2.51 | 0.0130 | ||
FoodType | HighS | 1.7381 | 8.1794 | 891 | 0.21 | 0.8318 | |
FoodType | LowS | 0 | . | . | . | . | |
MBStory | Chewer | 3.2795 | 9.3157 | 241 | 0.35 | 0.7251 | |
MBStory | Cruncher | 1.6270 | 8.6690 | 206 | 0.19 | 0.8513 | |
MBStory | Smoosher | -16.2304 | 9.9411 | 146 | -1.63 | 0.1047 | |
MBStory | Sucker | 0 | . | . | . | . | |
FoodType*MBStory | HighS | Chewer | 1.8109 | 9.7186 | 891 | 0.19 | 0.8522 |
FoodType*MBStory | HighS | Cruncher | -11.0407 | 8.9009 | 891 | -1.24 | 0.2152 |
FoodType*MBStory | HighS | Smoosher | 20.5119 | 9.8068 | 891 | 2.09 | 0.0368 |
FoodType*MBStory | HighS | Sucker | 0 | . | . | . | . |
FoodType*MBStory | LowS | Chewer | 0 | . | . | . | . |
FoodType*MBStory | LowS | Cruncher | 0 | . | . | . | . |
FoodType*MBStory | LowS | Smoosher | 0 | . | . | . | . |
FoodType*MBStory | LowS | Sucker | 0 | . | . | . | . |
Type 3 Tests of Fixed Effects | ||||
---|---|---|---|---|
Effect | Num DF | Den DF | F Value | Pr > F |
FoodType | 1 | 891 | 2.44 | 0.1183 |
MBStory | 3 | 98.7 | 0.96 | 0.4171 |
FoodType*MBStory | 3 | 891 | 8.09 | <.0001 |
Least Squares Means | |||||||
---|---|---|---|---|---|---|---|
Effect | FoodType | MBStory | Estimate | Standard Error |
DF | t Value | Pr > |t| |
FoodType | HighS | 21.9548 | 3.1849 | 75.3 | 6.89 | <.0001 | |
FoodType | LowS | 17.3962 | 3.1849 | 75.3 | 5.46 | <.0001 | |
MBStory | Chewer | 25.2812 | 4.6957 | 76.2 | 5.38 | <.0001 | |
MBStory | Cruncher | 17.2029 | 3.2984 | 57.4 | 5.22 | <.0001 | |
MBStory | Smoosher | 15.1218 | 5.2017 | 58.5 | 2.91 | 0.0051 | |
MBStory | Sucker | 21.0962 | 6.9457 | 98.4 | 3.04 | 0.0031 | |
FoodType*MBStory | HighS | Chewer | 27.0557 | 5.3793 | 129 | 5.03 | <.0001 |
FoodType*MBStory | HighS | Cruncher | 12.5516 | 3.7364 | 93.8 | 3.36 | 0.0011 |
FoodType*MBStory | HighS | Smoosher | 26.2468 | 5.8630 | 93.8 | 4.48 | <.0001 |
FoodType*MBStory | HighS | Sucker | 21.9653 | 8.0603 | 173 | 2.73 | 0.0071 |
FoodType*MBStory | LowS | Chewer | 23.5067 | 5.3793 | 129 | 4.37 | <.0001 |
FoodType*MBStory | LowS | Cruncher | 21.8542 | 3.7364 | 93.8 | 5.85 | <.0001 |
FoodType*MBStory | LowS | Smoosher | 3.9968 | 5.8630 | 93.8 | 0.68 | 0.4971 |
FoodType*MBStory | LowS | Sucker | 20.2272 | 8.0603 | 173 | 2.51 | 0.0130 |
Differences of Least Squares Means | |||||||||
---|---|---|---|---|---|---|---|---|---|
Effect | FoodType | MBStory | _FoodType | _MBStory | Estimate | Standard Error |
DF | t Value | Pr > |t| |
FoodType | HighS | LowS | 4.5586 | 2.9160 | 891 | 1.56 | 0.1183 | ||
MBStory | Chewer | Cruncher | 8.0783 | 5.3315 | 119 | 1.52 | 0.1324 | ||
MBStory | Chewer | Smoosher | 10.1593 | 6.9628 | 72.2 | 1.46 | 0.1489 | ||
MBStory | Chewer | Sucker | 4.1849 | 7.9479 | 136 | 0.53 | 0.5994 | ||
MBStory | Cruncher | Smoosher | 2.0811 | 5.8677 | 79.7 | 0.35 | 0.7238 | ||
MBStory | Cruncher | Sucker | -3.8934 | 7.4394 | 117 | -0.52 | 0.6017 | ||
MBStory | Smoosher | Sucker | -5.9744 | 8.6476 | 85.5 | -0.69 | 0.4915 | ||
FoodType*MBStory | HighS | Chewer | HighS | Cruncher | 14.5041 | 6.1962 | 207 | 2.34 | 0.0202 |
FoodType*MBStory | HighS | Chewer | HighS | Smoosher | 0.8089 | 7.9174 | 119 | 0.10 | 0.9188 |
FoodType*MBStory | HighS | Chewer | HighS | Sucker | 5.0904 | 9.3157 | 241 | 0.55 | 0.5853 |
FoodType*MBStory | HighS | Chewer | LowS | Chewer | 3.5490 | 5.2486 | 891 | 0.68 | 0.4991 |
FoodType*MBStory | HighS | Chewer | LowS | Cruncher | 5.2015 | 6.1962 | 207 | 0.84 | 0.4022 |
FoodType*MBStory | HighS | Chewer | LowS | Smoosher | 23.0589 | 7.9174 | 119 | 2.91 | 0.0043 |
FoodType*MBStory | HighS | Chewer | LowS | Sucker | 6.8285 | 9.3157 | 241 | 0.73 | 0.4643 |
FoodType*MBStory | HighS | Cruncher | HighS | Smoosher | -13.6953 | 6.6954 | 133 | -2.05 | 0.0428 |
FoodType*MBStory | HighS | Cruncher | HighS | Sucker | -9.4137 | 8.6690 | 206 | -1.09 | 0.2788 |
FoodType*MBStory | HighS | Cruncher | LowS | Chewer | -10.9551 | 6.1962 | 207 | -1.77 | 0.0785 |
FoodType*MBStory | HighS | Cruncher | LowS | Cruncher | -9.3026 | 3.5106 | 891 | -2.65 | 0.0082 |
FoodType*MBStory | HighS | Cruncher | LowS | Smoosher | 8.5547 | 6.6954 | 133 | 1.28 | 0.2036 |
FoodType*MBStory | HighS | Cruncher | LowS | Sucker | -7.6756 | 8.6690 | 206 | -0.89 | 0.3770 |
FoodType*MBStory | HighS | Smoosher | HighS | Sucker | 4.2815 | 9.9411 | 146 | 0.43 | 0.6673 |
FoodType*MBStory | HighS | Smoosher | LowS | Chewer | 2.7402 | 7.9174 | 119 | 0.35 | 0.7299 |
FoodType*MBStory | HighS | Smoosher | LowS | Cruncher | 4.3926 | 6.6954 | 133 | 0.66 | 0.5129 |
FoodType*MBStory | HighS | Smoosher | LowS | Smoosher | 22.2500 | 5.4102 | 891 | 4.11 | <.0001 |
FoodType*MBStory | HighS | Smoosher | LowS | Sucker | 6.0196 | 9.9411 | 146 | 0.61 | 0.5458 |
FoodType*MBStory | HighS | Sucker | LowS | Chewer | -1.5414 | 9.3157 | 241 | -0.17 | 0.8687 |
FoodType*MBStory | HighS | Sucker | LowS | Cruncher | 0.1111 | 8.6690 | 206 | 0.01 | 0.9898 |
FoodType*MBStory | HighS | Sucker | LowS | Smoosher | 17.9685 | 9.9411 | 146 | 1.81 | 0.0727 |
FoodType*MBStory | HighS | Sucker | LowS | Sucker | 1.7381 | 8.1794 | 891 | 0.21 | 0.8318 |
FoodType*MBStory | LowS | Chewer | LowS | Cruncher | 1.6525 | 6.1962 | 207 | 0.27 | 0.7900 |
FoodType*MBStory | LowS | Chewer | LowS | Smoosher | 19.5098 | 7.9174 | 119 | 2.46 | 0.0152 |
FoodType*MBStory | LowS | Chewer | LowS | Sucker | 3.2795 | 9.3157 | 241 | 0.35 | 0.7251 |
FoodType*MBStory | LowS | Cruncher | LowS | Smoosher | 17.8574 | 6.6954 | 133 | 2.67 | 0.0086 |
FoodType*MBStory | LowS | Cruncher | LowS | Sucker | 1.6270 | 8.6690 | 206 | 0.19 | 0.8513 |
FoodType*MBStory | LowS | Smoosher | LowS | Sucker | -16.2304 | 9.9411 | 146 | -1.63 | 0.1047 |
The Mixed Procedure
Model Information | |
---|---|
Data Set | WORK.STARCHSAS |
Dependent Variable | TextureL |
Covariance Structure | Compound Symmetry |
Subject Effect | SubjectID |
Estimation Method | REML |
Residual Variance Method | Profile |
Fixed Effects SE Method | Kenward-Roger |
Degrees of Freedom Method | Kenward-Roger |
Class Level Information | ||
---|---|---|
Class | Levels | Values |
SubjectID | 38 | 1 2 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 22 23 24 26 28 29 30 31 32 34 35 36 37 38 39 40 42 43 44 |
OrderAssigned | 2 | HighLow LowHigh |
Gender | 2 | Female Male |
VisitType | 2 | End Start |
Interventionwk | 1 | Low |
Taste | 2 | Fail Pass |
Smell | 2 | Fail Pass |
FoodType | 2 | HighS LowS |
MBStory | 4 | Chewer Cruncher Smoosher Sucker |
MBPicture | 4 | Chewer Cruncher Smoosher Sucker |
Dimensions | |
---|---|
Covariance Parameters | 2 |
Columns in X | 15 |
Columns in Z | 0 |
Subjects | 38 |
Max Obs per Subject | 24 |
Number of Observations | |
---|---|
Number of Observations Read | 900 |
Number of Observations Used | 900 |
Number of Observations Not Used | 0 |
Iteration History | |||
---|---|---|---|
Iteration | Evaluations | -2 Res Log Like | Criterion |
0 | 1 | 9174.33334994 | |
1 | 2 | 9115.24072220 | 0.00000006 |
2 | 1 | 9115.24048705 | 0.00000000 |
Convergence criteria met. |
Covariance Parameter Estimates | ||
---|---|---|
Cov Parm | Subject | Estimate |
CS | SubjectID | 203.29 |
Residual | 1455.94 |
Fit Statistics | |
---|---|
-2 Res Log Likelihood | 9115.2 |
AIC (Smaller is Better) | 9119.2 |
AICC (Smaller is Better) | 9119.3 |
BIC (Smaller is Better) | 9122.5 |
Null Model Likelihood Ratio Test | ||
---|---|---|
DF | Chi-Square | Pr > ChiSq |
1 | 59.09 | <.0001 |
Solution for Fixed Effects | |||||||
---|---|---|---|---|---|---|---|
Effect | FoodType | MBStory | Estimate | Standard Error |
DF | t Value | Pr > |t| |
Intercept | 34.7671 | 7.9900 | 222 | 4.35 | <.0001 | ||
FoodType | HighS | -16.5714 | 8.3265 | 858 | -1.99 | 0.0469 | |
FoodType | LowS | 0 | . | . | . | . | |
MBStory | Chewer | -8.5947 | 10.1405 | 173 | -0.85 | 0.3979 | |
MBStory | Cruncher | -7.1984 | 8.5202 | 304 | -0.84 | 0.3988 | |
MBStory | Smoosher | -31.1606 | 9.4140 | 239 | -3.31 | 0.0011 | |
MBStory | Sucker | 0 | . | . | . | . | |
FoodType*MBStory | HighS | Chewer | 26.4405 | 10.1978 | 858 | 2.59 | 0.0097 |
FoodType*MBStory | HighS | Cruncher | 4.3353 | 9.1001 | 858 | 0.48 | 0.6339 |
FoodType*MBStory | HighS | Smoosher | 34.2844 | 9.8129 | 858 | 3.49 | 0.0005 |
FoodType*MBStory | HighS | Sucker | 0 | . | . | . | . |
FoodType*MBStory | LowS | Chewer | 0 | . | . | . | . |
FoodType*MBStory | LowS | Cruncher | 0 | . | . | . | . |
FoodType*MBStory | LowS | Smoosher | 0 | . | . | . | . |
FoodType*MBStory | LowS | Sucker | 0 | . | . | . | . |
Type 3 Tests of Fixed Effects | ||||
---|---|---|---|---|
Effect | Num DF | Den DF | F Value | Pr > F |
FoodType | 1 | 858 | 0.01 | 0.9188 |
MBStory | 3 | 88.3 | 2.35 | 0.0782 |
FoodType*MBStory | 3 | 858 | 9.75 | <.0001 |
Least Squares Means | |||||||
---|---|---|---|---|---|---|---|
Effect | FoodType | MBStory | Estimate | Standard Error |
DF | t Value | Pr > |t| |
FoodType | HighS | 22.7223 | 3.3015 | 70 | 6.88 | <.0001 | |
FoodType | LowS | 23.0286 | 3.3015 | 70 | 6.98 | <.0001 | |
MBStory | Chewer | 31.1069 | 5.6063 | 58 | 5.55 | <.0001 | |
MBStory | Cruncher | 21.4506 | 3.5147 | 50.9 | 6.10 | <.0001 | |
MBStory | Smoosher | 12.4630 | 5.0490 | 51.5 | 2.47 | 0.0169 | |
MBStory | Sucker | 26.4814 | 6.8197 | 125 | 3.88 | 0.0002 | |
FoodType*MBStory | HighS | Chewer | 36.0414 | 6.3323 | 93.8 | 5.69 | <.0001 |
FoodType*MBStory | HighS | Cruncher | 15.3325 | 3.9652 | 82 | 3.87 | 0.0002 |
FoodType*MBStory | HighS | Smoosher | 21.3195 | 5.6774 | 82 | 3.76 | 0.0003 |
FoodType*MBStory | HighS | Sucker | 18.1956 | 7.9900 | 222 | 2.28 | 0.0237 |
FoodType*MBStory | LowS | Chewer | 26.1724 | 6.3323 | 93.8 | 4.13 | <.0001 |
FoodType*MBStory | LowS | Cruncher | 27.5686 | 3.9652 | 82 | 6.95 | <.0001 |
FoodType*MBStory | LowS | Smoosher | 3.6065 | 5.6774 | 82 | 0.64 | 0.5270 |
FoodType*MBStory | LowS | Sucker | 34.7671 | 7.9900 | 222 | 4.35 | <.0001 |
Differences of Least Squares Means | |||||||||
---|---|---|---|---|---|---|---|---|---|
Effect | FoodType | MBStory | _FoodType | _MBStory | Estimate | Standard Error |
DF | t Value | Pr > |t| |
FoodType | HighS | LowS | -0.3064 | 3.0046 | 858 | -0.10 | 0.9188 | ||
MBStory | Chewer | Cruncher | 9.6564 | 6.2730 | 79.9 | 1.54 | 0.1277 | ||
MBStory | Chewer | Smoosher | 18.6439 | 7.5235 | 57.8 | 2.48 | 0.0162 | ||
MBStory | Chewer | Sucker | 4.6256 | 8.7653 | 100 | 0.53 | 0.5989 | ||
MBStory | Cruncher | Smoosher | 8.9876 | 5.9682 | 64.5 | 1.51 | 0.1370 | ||
MBStory | Cruncher | Sucker | -5.0308 | 7.2035 | 172 | -0.70 | 0.4859 | ||
MBStory | Smoosher | Sucker | -14.0184 | 8.0343 | 135 | -1.74 | 0.0833 | ||
FoodType*MBStory | HighS | Chewer | HighS | Cruncher | 20.7089 | 7.1685 | 134 | 2.89 | 0.0045 |
FoodType*MBStory | HighS | Chewer | HighS | Smoosher | 14.7220 | 8.4859 | 93 | 1.73 | 0.0861 |
FoodType*MBStory | HighS | Chewer | HighS | Sucker | 17.8458 | 10.1405 | 173 | 1.76 | 0.0802 |
FoodType*MBStory | HighS | Chewer | LowS | Chewer | 9.8690 | 5.8877 | 858 | 1.68 | 0.0941 |
FoodType*MBStory | HighS | Chewer | LowS | Cruncher | 8.4728 | 7.1685 | 134 | 1.18 | 0.2393 |
FoodType*MBStory | HighS | Chewer | LowS | Smoosher | 32.4349 | 8.4859 | 93 | 3.82 | 0.0002 |
FoodType*MBStory | HighS | Chewer | LowS | Sucker | 1.2744 | 10.1405 | 173 | 0.13 | 0.9001 |
FoodType*MBStory | HighS | Cruncher | HighS | Smoosher | -5.9870 | 6.7624 | 105 | -0.89 | 0.3780 |
FoodType*MBStory | HighS | Cruncher | HighS | Sucker | -2.8631 | 8.5202 | 304 | -0.34 | 0.7371 |
FoodType*MBStory | HighS | Cruncher | LowS | Chewer | -10.8399 | 7.1685 | 134 | -1.51 | 0.1328 |
FoodType*MBStory | HighS | Cruncher | LowS | Cruncher | -12.2361 | 3.6716 | 858 | -3.33 | 0.0009 |
FoodType*MBStory | HighS | Cruncher | LowS | Smoosher | 11.7260 | 6.7624 | 105 | 1.73 | 0.0858 |
FoodType*MBStory | HighS | Cruncher | LowS | Sucker | -19.4346 | 8.5202 | 304 | -2.28 | 0.0232 |
FoodType*MBStory | HighS | Smoosher | HighS | Sucker | 3.1238 | 9.4140 | 239 | 0.33 | 0.7403 |
FoodType*MBStory | HighS | Smoosher | LowS | Chewer | -4.8529 | 8.4859 | 93 | -0.57 | 0.5688 |
FoodType*MBStory | HighS | Smoosher | LowS | Cruncher | -6.2492 | 6.7624 | 105 | -0.92 | 0.3575 |
FoodType*MBStory | HighS | Smoosher | LowS | Smoosher | 17.7130 | 5.1925 | 858 | 3.41 | 0.0007 |
FoodType*MBStory | HighS | Smoosher | LowS | Sucker | -13.4476 | 9.4140 | 239 | -1.43 | 0.1545 |
FoodType*MBStory | HighS | Sucker | LowS | Chewer | -7.9768 | 10.1405 | 173 | -0.79 | 0.4326 |
FoodType*MBStory | HighS | Sucker | LowS | Cruncher | -9.3730 | 8.5202 | 304 | -1.10 | 0.2722 |
FoodType*MBStory | HighS | Sucker | LowS | Smoosher | 14.5891 | 9.4140 | 239 | 1.55 | 0.1225 |
FoodType*MBStory | HighS | Sucker | LowS | Sucker | -16.5714 | 8.3265 | 858 | -1.99 | 0.0469 |
FoodType*MBStory | LowS | Chewer | LowS | Cruncher | -1.3962 | 7.1685 | 134 | -0.19 | 0.8459 |
FoodType*MBStory | LowS | Chewer | LowS | Smoosher | 22.5659 | 8.4859 | 93 | 2.66 | 0.0092 |
FoodType*MBStory | LowS | Chewer | LowS | Sucker | -8.5947 | 10.1405 | 173 | -0.85 | 0.3979 |
FoodType*MBStory | LowS | Cruncher | LowS | Smoosher | 23.9621 | 6.7624 | 105 | 3.54 | 0.0006 |
FoodType*MBStory | LowS | Cruncher | LowS | Sucker | -7.1984 | 8.5202 | 304 | -0.84 | 0.3988 |
FoodType*MBStory | LowS | Smoosher | LowS | Sucker | -31.1606 | 9.4140 | 239 | -3.31 | 0.0011 |
%%SAS sas
proc sort data = starchsas;
by interventionwk Shortname orderassigned subjectID;
run;
title 'Liking Final';
ods output diffs = diffli tests3=testsli lsmeans =meansli
lsmESTIMATEs =Estimli SolutionF= solli;
Proc mixed data=starchsas;
by interventionwk;
class subjectID orderassigned gender visittype interventionwk taste smell foodtype mbstory mbpicture;
model Liking = FoodType MBStory MBStory*Foodtype
/ ddfm = kr solution; * residual; *removed foodtype*visittype
pudding40s*visittype Smell Taste Visittype Pudding40s ;
repeated / subject = subjectID type = cs;
lsmeans MBStory / pdiff ADJDFE=ROW;
lsmeans foodtype/ pdiff ADJDFE=ROW;
lsmeans MBStory*Foodtype/ pdiff ADJDFE=ROW;
run;
The Mixed Procedure
Model Information | |
---|---|
Data Set | WORK.STARCHSAS |
Dependent Variable | Liking |
Covariance Structure | Compound Symmetry |
Subject Effect | SubjectID |
Estimation Method | REML |
Residual Variance Method | Profile |
Fixed Effects SE Method | Kenward-Roger |
Degrees of Freedom Method | Kenward-Roger |
Class Level Information | ||
---|---|---|
Class | Levels | Values |
SubjectID | 41 | 1 2 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 42 43 44 |
OrderAssigned | 2 | HighLow LowHigh |
Gender | 2 | Female Male |
VisitType | 2 | End Start |
Interventionwk | 1 | High |
Taste | 2 | Fail Pass |
Smell | 2 | Fail Pass |
FoodType | 2 | HighS LowS |
MBStory | 4 | Chewer Cruncher Smoosher Sucker |
MBPicture | 4 | Chewer Cruncher Smoosher Sucker |
Dimensions | |
---|---|
Covariance Parameters | 2 |
Columns in X | 15 |
Columns in Z | 0 |
Subjects | 41 |
Max Obs per Subject | 24 |
Number of Observations | |
---|---|
Number of Observations Read | 947 |
Number of Observations Used | 936 |
Number of Observations Not Used | 11 |
Iteration History | |||
---|---|---|---|
Iteration | Evaluations | -2 Res Log Like | Criterion |
0 | 1 | 9709.55935521 | |
1 | 2 | 9654.05831005 | 0.00000000 |
Convergence criteria met. |
Covariance Parameter Estimates | ||
---|---|---|
Cov Parm | Subject | Estimate |
CS | SubjectID | 233.99 |
Residual | 1753.21 |
Fit Statistics | |
---|---|
-2 Res Log Likelihood | 9654.1 |
AIC (Smaller is Better) | 9658.1 |
AICC (Smaller is Better) | 9658.1 |
BIC (Smaller is Better) | 9661.5 |
Null Model Likelihood Ratio Test | ||
---|---|---|
DF | Chi-Square | Pr > ChiSq |
1 | 55.50 | <.0001 |
Solution for Fixed Effects | |||||||
---|---|---|---|---|---|---|---|
Effect | FoodType | MBStory | Estimate | Standard Error |
DF | t Value | Pr > |t| |
Intercept | 20.2138 | 8.9363 | 168 | 2.26 | 0.0250 | ||
FoodType | HighS | -3.0476 | 9.1371 | 890 | -0.33 | 0.7388 | |
FoodType | LowS | 0 | . | . | . | . | |
MBStory | Chewer | -4.4634 | 10.3422 | 233 | -0.43 | 0.6665 | |
MBStory | Cruncher | 4.2609 | 9.6181 | 200 | 0.44 | 0.6582 | |
MBStory | Smoosher | -13.8846 | 11.0127 | 142 | -1.26 | 0.2095 | |
MBStory | Sucker | 0 | . | . | . | . | |
FoodType*MBStory | HighS | Chewer | 14.9496 | 10.8565 | 890 | 1.38 | 0.1689 |
FoodType*MBStory | HighS | Cruncher | -5.5357 | 9.9431 | 890 | -0.56 | 0.5778 |
FoodType*MBStory | HighS | Smoosher | 24.8601 | 10.9550 | 890 | 2.27 | 0.0235 |
FoodType*MBStory | HighS | Sucker | 0 | . | . | . | . |
FoodType*MBStory | LowS | Chewer | 0 | . | . | . | . |
FoodType*MBStory | LowS | Cruncher | 0 | . | . | . | . |
FoodType*MBStory | LowS | Smoosher | 0 | . | . | . | . |
FoodType*MBStory | LowS | Sucker | 0 | . | . | . | . |
Type 3 Tests of Fixed Effects | ||||
---|---|---|---|---|
Effect | Num DF | Den DF | F Value | Pr > F |
FoodType | 1 | 890 | 2.87 | 0.0904 |
MBStory | 3 | 94.4 | 0.13 | 0.9433 |
FoodType*MBStory | 3 | 890 | 7.05 | 0.0001 |
Least Squares Means | |||||||
---|---|---|---|---|---|---|---|
Effect | FoodType | MBStory | Estimate | Standard Error |
DF | t Value | Pr > |t| |
MBStory | Chewer | 21.7014 | 5.1846 | 73.7 | 4.19 | <.0001 | |
MBStory | Cruncher | 20.1830 | 3.6350 | 55.8 | 5.55 | <.0001 | |
MBStory | Smoosher | 17.2355 | 5.7327 | 56.4 | 3.01 | 0.0039 | |
MBStory | Sucker | 18.6900 | 7.6802 | 94.7 | 2.43 | 0.0168 | |
FoodType | HighS | 22.2129 | 3.5159 | 74.4 | 6.32 | <.0001 | |
FoodType | LowS | 16.6920 | 3.5159 | 74.4 | 4.75 | <.0001 | |
FoodType*MBStory | HighS | Chewer | 27.6523 | 5.9560 | 126 | 4.64 | <.0001 |
FoodType*MBStory | HighS | Cruncher | 15.8913 | 4.1301 | 92.3 | 3.85 | 0.0002 |
FoodType*MBStory | HighS | Smoosher | 28.1417 | 6.4803 | 91.7 | 4.34 | <.0001 |
FoodType*MBStory | HighS | Sucker | 17.1662 | 8.9363 | 168 | 1.92 | 0.0564 |
FoodType*MBStory | LowS | Chewer | 15.7504 | 5.9560 | 126 | 2.64 | 0.0092 |
FoodType*MBStory | LowS | Cruncher | 24.4747 | 4.1301 | 92.3 | 5.93 | <.0001 |
FoodType*MBStory | LowS | Smoosher | 6.3292 | 6.4803 | 91.7 | 0.98 | 0.3313 |
FoodType*MBStory | LowS | Sucker | 20.2138 | 8.9363 | 168 | 2.26 | 0.0250 |
Differences of Least Squares Means | |||||||||
---|---|---|---|---|---|---|---|---|---|
Effect | FoodType | MBStory | _FoodType | _MBStory | Estimate | Standard Error |
DF | t Value | Pr > |t| |
MBStory | Chewer | Cruncher | 1.5184 | 5.9012 | 113 | 0.26 | 0.7974 | ||
MBStory | Chewer | Smoosher | 4.4659 | 7.6843 | 69.4 | 0.58 | 0.5630 | ||
MBStory | Chewer | Sucker | 3.0114 | 8.8031 | 130 | 0.34 | 0.7328 | ||
MBStory | Cruncher | Smoosher | 2.9475 | 6.4799 | 76.4 | 0.45 | 0.6505 | ||
MBStory | Cruncher | Sucker | 1.4930 | 8.2335 | 112 | 0.18 | 0.8564 | ||
MBStory | Smoosher | Sucker | -1.4545 | 9.5538 | 82.1 | -0.15 | 0.8794 | ||
FoodType | HighS | LowS | 5.5209 | 3.2574 | 890 | 1.69 | 0.0904 | ||
FoodType*MBStory | HighS | Chewer | HighS | Cruncher | 11.7610 | 6.8748 | 200 | 1.71 | 0.0887 |
FoodType*MBStory | HighS | Chewer | HighS | Smoosher | -0.4894 | 8.7621 | 116 | -0.06 | 0.9556 |
FoodType*MBStory | HighS | Chewer | HighS | Sucker | 10.4862 | 10.3422 | 233 | 1.01 | 0.3117 |
FoodType*MBStory | HighS | Chewer | LowS | Chewer | 11.9020 | 5.8632 | 890 | 2.03 | 0.0427 |
FoodType*MBStory | HighS | Chewer | LowS | Cruncher | 3.1777 | 6.8748 | 200 | 0.46 | 0.6444 |
FoodType*MBStory | HighS | Chewer | LowS | Smoosher | 21.3231 | 8.7621 | 116 | 2.43 | 0.0165 |
FoodType*MBStory | HighS | Chewer | LowS | Sucker | 7.4386 | 10.3422 | 233 | 0.72 | 0.4727 |
FoodType*MBStory | HighS | Cruncher | HighS | Smoosher | -12.2504 | 7.4138 | 129 | -1.65 | 0.1009 |
FoodType*MBStory | HighS | Cruncher | HighS | Sucker | -1.2748 | 9.6181 | 200 | -0.13 | 0.8947 |
FoodType*MBStory | HighS | Cruncher | LowS | Chewer | 0.1409 | 6.8748 | 200 | 0.02 | 0.9837 |
FoodType*MBStory | HighS | Cruncher | LowS | Cruncher | -8.5833 | 3.9216 | 890 | -2.19 | 0.0289 |
FoodType*MBStory | HighS | Cruncher | LowS | Smoosher | 9.5621 | 7.4138 | 129 | 1.29 | 0.1994 |
FoodType*MBStory | HighS | Cruncher | LowS | Sucker | -4.3225 | 9.6181 | 200 | -0.45 | 0.6536 |
FoodType*MBStory | HighS | Smoosher | HighS | Sucker | 10.9755 | 11.0127 | 142 | 1.00 | 0.3206 |
FoodType*MBStory | HighS | Smoosher | LowS | Chewer | 12.3913 | 8.7621 | 116 | 1.41 | 0.1600 |
FoodType*MBStory | HighS | Smoosher | LowS | Cruncher | 3.6671 | 7.4138 | 129 | 0.49 | 0.6217 |
FoodType*MBStory | HighS | Smoosher | LowS | Smoosher | 21.8125 | 6.0436 | 890 | 3.61 | 0.0003 |
FoodType*MBStory | HighS | Smoosher | LowS | Sucker | 7.9279 | 11.0127 | 142 | 0.72 | 0.4728 |
FoodType*MBStory | HighS | Sucker | LowS | Chewer | 1.4158 | 10.3422 | 233 | 0.14 | 0.8912 |
FoodType*MBStory | HighS | Sucker | LowS | Cruncher | -7.3085 | 9.6181 | 200 | -0.76 | 0.4482 |
FoodType*MBStory | HighS | Sucker | LowS | Smoosher | 10.8370 | 11.0127 | 142 | 0.98 | 0.3268 |
FoodType*MBStory | HighS | Sucker | LowS | Sucker | -3.0476 | 9.1371 | 890 | -0.33 | 0.7388 |
FoodType*MBStory | LowS | Chewer | LowS | Cruncher | -8.7243 | 6.8748 | 200 | -1.27 | 0.2059 |
FoodType*MBStory | LowS | Chewer | LowS | Smoosher | 9.4212 | 8.7621 | 116 | 1.08 | 0.2845 |
FoodType*MBStory | LowS | Chewer | LowS | Sucker | -4.4634 | 10.3422 | 233 | -0.43 | 0.6665 |
FoodType*MBStory | LowS | Cruncher | LowS | Smoosher | 18.1454 | 7.4138 | 129 | 2.45 | 0.0157 |
FoodType*MBStory | LowS | Cruncher | LowS | Sucker | 4.2609 | 9.6181 | 200 | 0.44 | 0.6582 |
FoodType*MBStory | LowS | Smoosher | LowS | Sucker | -13.8846 | 11.0127 | 142 | -1.26 | 0.2095 |
The Mixed Procedure
Model Information | |
---|---|
Data Set | WORK.STARCHSAS |
Dependent Variable | Liking |
Covariance Structure | Compound Symmetry |
Subject Effect | SubjectID |
Estimation Method | REML |
Residual Variance Method | Profile |
Fixed Effects SE Method | Kenward-Roger |
Degrees of Freedom Method | Kenward-Roger |
Class Level Information | ||
---|---|---|
Class | Levels | Values |
SubjectID | 38 | 1 2 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 22 23 24 26 28 29 30 31 32 34 35 36 37 38 39 40 42 43 44 |
OrderAssigned | 2 | HighLow LowHigh |
Gender | 2 | Female Male |
VisitType | 2 | End Start |
Interventionwk | 1 | Low |
Taste | 2 | Fail Pass |
Smell | 2 | Fail Pass |
FoodType | 2 | HighS LowS |
MBStory | 4 | Chewer Cruncher Smoosher Sucker |
MBPicture | 4 | Chewer Cruncher Smoosher Sucker |
Dimensions | |
---|---|
Covariance Parameters | 2 |
Columns in X | 15 |
Columns in Z | 0 |
Subjects | 38 |
Max Obs per Subject | 24 |
Number of Observations | |
---|---|
Number of Observations Read | 900 |
Number of Observations Used | 900 |
Number of Observations Not Used | 0 |
Iteration History | |||
---|---|---|---|
Iteration | Evaluations | -2 Res Log Like | Criterion |
0 | 1 | 9322.42789593 | |
1 | 2 | 9270.20744742 | 0.00000006 |
2 | 1 | 9270.20721029 | 0.00000000 |
Convergence criteria met. |
Covariance Parameter Estimates | ||
---|---|---|
Cov Parm | Subject | Estimate |
CS | SubjectID | 220.65 |
Residual | 1737.07 |
Fit Statistics | |
---|---|
-2 Res Log Likelihood | 9270.2 |
AIC (Smaller is Better) | 9274.2 |
AICC (Smaller is Better) | 9274.2 |
BIC (Smaller is Better) | 9277.5 |
Null Model Likelihood Ratio Test | ||
---|---|---|
DF | Chi-Square | Pr > ChiSq |
1 | 52.22 | <.0001 |
Solution for Fixed Effects | |||||||
---|---|---|---|---|---|---|---|
Effect | FoodType | MBStory | Estimate | Standard Error |
DF | t Value | Pr > |t| |
Intercept | 27.1223 | 8.6087 | 218 | 3.15 | 0.0019 | ||
FoodType | HighS | -6.5952 | 9.0949 | 858 | -0.73 | 0.4686 | |
FoodType | LowS | 0 | . | . | . | . | |
MBStory | Chewer | -0.8315 | 10.9000 | 169 | -0.08 | 0.9393 | |
MBStory | Cruncher | -1.8779 | 9.2013 | 291 | -0.20 | 0.8384 | |
MBStory | Smoosher | -16.6534 | 10.1472 | 231 | -1.64 | 0.1021 | |
MBStory | Sucker | 0 | . | . | . | . | |
FoodType*MBStory | HighS | Chewer | 13.0119 | 11.1390 | 858 | 1.17 | 0.2431 |
FoodType*MBStory | HighS | Cruncher | -1.8631 | 9.9399 | 858 | -0.19 | 0.8514 |
FoodType*MBStory | HighS | Smoosher | 21.7434 | 10.7185 | 858 | 2.03 | 0.0428 |
FoodType*MBStory | HighS | Sucker | 0 | . | . | . | . |
FoodType*MBStory | LowS | Chewer | 0 | . | . | . | . |
FoodType*MBStory | LowS | Cruncher | 0 | . | . | . | . |
FoodType*MBStory | LowS | Smoosher | 0 | . | . | . | . |
FoodType*MBStory | LowS | Sucker | 0 | . | . | . | . |
Type 3 Tests of Fixed Effects | ||||
---|---|---|---|---|
Effect | Num DF | Den DF | F Value | Pr > F |
FoodType | 1 | 858 | 0.25 | 0.6200 |
MBStory | 3 | 84.4 | 0.80 | 0.4984 |
FoodType*MBStory | 3 | 858 | 4.37 | 0.0046 |
Least Squares Means | |||||||
---|---|---|---|---|---|---|---|
Effect | FoodType | MBStory | Estimate | Standard Error |
DF | t Value | Pr > |t| |
MBStory | Chewer | 29.4991 | 5.9515 | 56.6 | 4.96 | <.0001 | |
MBStory | Cruncher | 21.0152 | 3.7251 | 50.4 | 5.64 | <.0001 | |
MBStory | Smoosher | 18.0429 | 5.3507 | 50.6 | 3.37 | 0.0014 | |
MBStory | Sucker | 23.8247 | 7.3096 | 120 | 3.26 | 0.0015 | |
FoodType | HighS | 23.9094 | 3.5160 | 71.9 | 6.80 | <.0001 | |
FoodType | LowS | 22.2815 | 3.5160 | 71.9 | 6.34 | <.0001 | |
FoodType*MBStory | HighS | Chewer | 32.7074 | 6.7646 | 93.8 | 4.84 | <.0001 |
FoodType*MBStory | HighS | Cruncher | 16.7860 | 4.2305 | 83.4 | 3.97 | 0.0002 |
FoodType*MBStory | HighS | Smoosher | 25.6170 | 6.0557 | 82.6 | 4.23 | <.0001 |
FoodType*MBStory | HighS | Sucker | 20.5270 | 8.6087 | 218 | 2.38 | 0.0180 |
FoodType*MBStory | LowS | Chewer | 26.2907 | 6.7646 | 93.8 | 3.89 | 0.0002 |
FoodType*MBStory | LowS | Cruncher | 25.2443 | 4.2305 | 83.4 | 5.97 | <.0001 |
FoodType*MBStory | LowS | Smoosher | 10.4688 | 6.0557 | 82.6 | 1.73 | 0.0876 |
FoodType*MBStory | LowS | Sucker | 27.1223 | 8.6087 | 218 | 3.15 | 0.0019 |
Differences of Least Squares Means | |||||||||
---|---|---|---|---|---|---|---|---|---|
Effect | FoodType | MBStory | _FoodType | _MBStory | Estimate | Standard Error |
DF | t Value | Pr > |t| |
MBStory | Chewer | Cruncher | 8.4839 | 6.6866 | 76.5 | 1.27 | 0.2084 | ||
MBStory | Chewer | Smoosher | 11.4562 | 7.9848 | 56.1 | 1.43 | 0.1569 | ||
MBStory | Chewer | Sucker | 5.6744 | 9.3696 | 95.7 | 0.61 | 0.5462 | ||
MBStory | Cruncher | Smoosher | 2.9723 | 6.3439 | 62.4 | 0.47 | 0.6410 | ||
MBStory | Cruncher | Sucker | -2.8095 | 7.7436 | 161 | -0.36 | 0.7172 | ||
MBStory | Smoosher | Sucker | -5.7818 | 8.6165 | 128 | -0.67 | 0.5034 | ||
FoodType | HighS | LowS | 1.6278 | 3.2818 | 858 | 0.50 | 0.6200 | ||
FoodType*MBStory | HighS | Chewer | HighS | Cruncher | 15.9214 | 7.6858 | 131 | 2.07 | 0.0403 |
FoodType*MBStory | HighS | Chewer | HighS | Smoosher | 7.0904 | 9.0630 | 92.6 | 0.78 | 0.4360 |
FoodType*MBStory | HighS | Chewer | HighS | Sucker | 12.1804 | 10.9000 | 169 | 1.12 | 0.2654 |
FoodType*MBStory | HighS | Chewer | LowS | Chewer | 6.4167 | 6.4311 | 858 | 1.00 | 0.3187 |
FoodType*MBStory | HighS | Chewer | LowS | Cruncher | 7.4631 | 7.6858 | 131 | 0.97 | 0.3333 |
FoodType*MBStory | HighS | Chewer | LowS | Smoosher | 22.2386 | 9.0630 | 92.6 | 2.45 | 0.0160 |
FoodType*MBStory | HighS | Chewer | LowS | Sucker | 5.5851 | 10.9000 | 169 | 0.51 | 0.6090 |
FoodType*MBStory | HighS | Cruncher | HighS | Smoosher | -8.8310 | 7.2324 | 104 | -1.22 | 0.2248 |
FoodType*MBStory | HighS | Cruncher | HighS | Sucker | -3.7410 | 9.2013 | 291 | -0.41 | 0.6846 |
FoodType*MBStory | HighS | Cruncher | LowS | Chewer | -9.5047 | 7.6858 | 131 | -1.24 | 0.2184 |
FoodType*MBStory | HighS | Cruncher | LowS | Cruncher | -8.4583 | 4.0105 | 858 | -2.11 | 0.0352 |
FoodType*MBStory | HighS | Cruncher | LowS | Smoosher | 6.3172 | 7.2324 | 104 | 0.87 | 0.3844 |
FoodType*MBStory | HighS | Cruncher | LowS | Sucker | -10.3363 | 9.2013 | 291 | -1.12 | 0.2622 |
FoodType*MBStory | HighS | Smoosher | HighS | Sucker | 5.0899 | 10.1472 | 231 | 0.50 | 0.6164 |
FoodType*MBStory | HighS | Smoosher | LowS | Chewer | -0.6738 | 9.0630 | 92.6 | -0.07 | 0.9409 |
FoodType*MBStory | HighS | Smoosher | LowS | Cruncher | 0.3726 | 7.2324 | 104 | 0.05 | 0.9590 |
FoodType*MBStory | HighS | Smoosher | LowS | Smoosher | 15.1481 | 5.6717 | 858 | 2.67 | 0.0077 |
FoodType*MBStory | HighS | Smoosher | LowS | Sucker | -1.5053 | 10.1472 | 231 | -0.15 | 0.8822 |
FoodType*MBStory | HighS | Sucker | LowS | Chewer | -5.7637 | 10.9000 | 169 | -0.53 | 0.5976 |
FoodType*MBStory | HighS | Sucker | LowS | Cruncher | -4.7173 | 9.2013 | 291 | -0.51 | 0.6086 |
FoodType*MBStory | HighS | Sucker | LowS | Smoosher | 10.0582 | 10.1472 | 231 | 0.99 | 0.3226 |
FoodType*MBStory | HighS | Sucker | LowS | Sucker | -6.5952 | 9.0949 | 858 | -0.73 | 0.4686 |
FoodType*MBStory | LowS | Chewer | LowS | Cruncher | 1.0464 | 7.6858 | 131 | 0.14 | 0.8919 |
FoodType*MBStory | LowS | Chewer | LowS | Smoosher | 15.8219 | 9.0630 | 92.6 | 1.75 | 0.0842 |
FoodType*MBStory | LowS | Chewer | LowS | Sucker | -0.8315 | 10.9000 | 169 | -0.08 | 0.9393 |
FoodType*MBStory | LowS | Cruncher | LowS | Smoosher | 14.7755 | 7.2324 | 104 | 2.04 | 0.0436 |
FoodType*MBStory | LowS | Cruncher | LowS | Sucker | -1.8779 | 9.2013 | 291 | -0.20 | 0.8384 |
FoodType*MBStory | LowS | Smoosher | LowS | Sucker | -16.6534 | 10.1472 | 231 | -1.64 | 0.1021 |
%%SAS sas
proc sort data = starchsas;
by interventionwk Shortname orderassigned subjectID;
run;
title 'Desire to eat test';
ods output diffs = diffde tests3=testsde lsmeans =meansde
lsmESTIMATEs =Estimde SolutionF= solde;
Proc mixed data=starchsas;
by interventionwk;
class subjectID orderassigned gender visittype interventionwk taste smell foodtype mbstory mbpicture;
model 'Desire to Eat'n = Pudding40s Visittype FoodType MBStory
pudding40s*visittype MBStory*Foodtype
/ ddfm = kr solution ; *residual; *removed foodtype*visittype Smell Taste ;
repeated / subject = subjectID type = cs;
lsmeans visittype / pdiff ADJDFE=ROW;
lsmeans foodtype/ pdiff ADJDFE=ROW;
lsmeans MBStory/ pdiff ADJDFE=ROW;
lsmeans MBStory*Foodtype/ pdiff ADJDFE=ROW;
run;
The Mixed Procedure
Model Information | |
---|---|
Data Set | WORK.STARCHSAS |
Dependent Variable | Desire to Eat |
Covariance Structure | Compound Symmetry |
Subject Effect | SubjectID |
Estimation Method | REML |
Residual Variance Method | Profile |
Fixed Effects SE Method | Kenward-Roger |
Degrees of Freedom Method | Kenward-Roger |
Class Level Information | ||
---|---|---|
Class | Levels | Values |
SubjectID | 41 | 1 2 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 42 43 44 |
OrderAssigned | 2 | HighLow LowHigh |
Gender | 2 | Female Male |
VisitType | 2 | End Start |
Interventionwk | 1 | High |
Taste | 2 | Fail Pass |
Smell | 2 | Fail Pass |
FoodType | 2 | HighS LowS |
MBStory | 4 | Chewer Cruncher Smoosher Sucker |
MBPicture | 4 | Chewer Cruncher Smoosher Sucker |
Dimensions | |
---|---|
Covariance Parameters | 2 |
Columns in X | 20 |
Columns in Z | 0 |
Subjects | 41 |
Max Obs per Subject | 24 |
Number of Observations | |
---|---|
Number of Observations Read | 947 |
Number of Observations Used | 936 |
Number of Observations Not Used | 11 |
Iteration History | |||
---|---|---|---|
Iteration | Evaluations | -2 Res Log Like | Criterion |
0 | 1 | 9920.10660098 | |
1 | 2 | 9785.09052228 | 0.00000001 |
Convergence criteria met. |
Covariance Parameter Estimates | ||
---|---|---|
Cov Parm | Subject | Estimate |
CS | SubjectID | 550.80 |
Residual | 1994.89 |
Fit Statistics | |
---|---|
-2 Res Log Likelihood | 9785.1 |
AIC (Smaller is Better) | 9789.1 |
AICC (Smaller is Better) | 9789.1 |
BIC (Smaller is Better) | 9792.5 |
Null Model Likelihood Ratio Test | ||
---|---|---|
DF | Chi-Square | Pr > ChiSq |
1 | 135.02 | <.0001 |
Solution for Fixed Effects | ||||||||
---|---|---|---|---|---|---|---|---|
Effect | VisitType | FoodType | MBStory | Estimate | Standard Error |
DF | t Value | Pr > |t| |
Intercept | -0.3174 | 12.6625 | 235 | -0.03 | 0.9800 | |||
Pudding40s | 0.5235 | 1.2213 | 197 | 0.43 | 0.6687 | |||
VisitType | End | 13.0759 | 9.0143 | 919 | 1.45 | 0.1472 | ||
VisitType | Start | 0 | . | . | . | . | ||
FoodType | HighS | -2.1667 | 9.7465 | 887 | -0.22 | 0.8241 | ||
FoodType | LowS | 0 | . | . | . | . | ||
MBStory | Chewer | -2.7819 | 12.4293 | 322 | -0.22 | 0.8230 | ||
MBStory | Cruncher | 3.1355 | 11.6263 | 244 | 0.27 | 0.7876 | ||
MBStory | Smoosher | -12.1784 | 13.7323 | 173 | -0.89 | 0.3764 | ||
MBStory | Sucker | 0 | . | . | . | . | ||
Pudding40s*VisitType | End | -2.7760 | 1.2310 | 906 | -2.26 | 0.0244 | ||
Pudding40s*VisitType | Start | 0 | . | . | . | . | ||
FoodType*MBStory | HighS | Chewer | 7.0784 | 11.5806 | 887 | 0.61 | 0.5412 | |
FoodType*MBStory | HighS | Cruncher | -3.1184 | 10.6063 | 887 | -0.29 | 0.7688 | |
FoodType*MBStory | HighS | Smoosher | 21.4792 | 11.6857 | 887 | 1.84 | 0.0664 | |
FoodType*MBStory | HighS | Sucker | 0 | . | . | . | . | |
FoodType*MBStory | LowS | Chewer | 0 | . | . | . | . | |
FoodType*MBStory | LowS | Cruncher | 0 | . | . | . | . | |
FoodType*MBStory | LowS | Smoosher | 0 | . | . | . | . | |
FoodType*MBStory | LowS | Sucker | 0 | . | . | . | . |
Type 3 Tests of Fixed Effects | ||||
---|---|---|---|---|
Effect | Num DF | Den DF | F Value | Pr > F |
Pudding40s | 1 | 180 | 0.61 | 0.4339 |
VisitType | 1 | 919 | 2.10 | 0.1472 |
FoodType | 1 | 887 | 1.46 | 0.2278 |
MBStory | 3 | 148 | 0.04 | 0.9873 |
Pudding40s*VisitType | 1 | 906 | 5.09 | 0.0244 |
FoodType*MBStory | 3 | 887 | 3.55 | 0.0142 |
Least Squares Means | ||||||||
---|---|---|---|---|---|---|---|---|
Effect | VisitType | FoodType | MBStory | Estimate | Standard Error |
DF | t Value | Pr > |t| |
VisitType | End | -3.4185 | 4.6430 | 60.6 | -0.74 | 0.4644 | ||
VisitType | Start | 2.3825 | 4.6220 | 55.9 | 0.52 | 0.6083 | ||
FoodType | HighS | 1.5786 | 4.7040 | 62.5 | 0.34 | 0.7383 | ||
FoodType | LowS | -2.6145 | 4.7040 | 62.5 | -0.56 | 0.5803 | ||
MBStory | Chewer | 0.01561 | 6.8252 | 93.4 | 0.00 | 0.9982 | ||
MBStory | Cruncher | 0.8346 | 4.9554 | 61.3 | 0.17 | 0.8668 | ||
MBStory | Smoosher | -2.1805 | 7.7966 | 70.2 | -0.28 | 0.7806 | ||
MBStory | Sucker | -0.7417 | 9.8874 | 121 | -0.08 | 0.9403 | ||
FoodType*MBStory | HighS | Chewer | 2.4715 | 7.5075 | 135 | 0.33 | 0.7425 | |
FoodType*MBStory | HighS | Cruncher | -1.8079 | 5.3788 | 84.6 | -0.34 | 0.7376 | |
FoodType*MBStory | HighS | Smoosher | 7.4758 | 8.4367 | 95.8 | 0.89 | 0.3778 | |
FoodType*MBStory | HighS | Sucker | -1.8250 | 11.0231 | 181 | -0.17 | 0.8687 | |
FoodType*MBStory | LowS | Chewer | -2.4403 | 7.5075 | 135 | -0.33 | 0.7457 | |
FoodType*MBStory | LowS | Cruncher | 3.4772 | 5.3788 | 84.6 | 0.65 | 0.5197 | |
FoodType*MBStory | LowS | Smoosher | -11.8367 | 8.4367 | 95.8 | -1.40 | 0.1638 | |
FoodType*MBStory | LowS | Sucker | 0.3417 | 11.0231 | 181 | 0.03 | 0.9753 |
Differences of Least Squares Means | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Effect | VisitType | FoodType | MBStory | _VisitType | _FoodType | _MBStory | Estimate | Standard Error |
DF | t Value | Pr > |t| |
VisitType | End | Start | -5.8009 | 3.0666 | 924 | -1.89 | 0.0588 | ||||
FoodType | HighS | LowS | 4.1931 | 3.4746 | 887 | 1.21 | 0.2278 | ||||
MBStory | Chewer | Cruncher | -0.8190 | 7.4257 | 219 | -0.11 | 0.9123 | ||||
MBStory | Chewer | Smoosher | 2.1961 | 10.1110 | 96.1 | 0.22 | 0.8285 | ||||
MBStory | Chewer | Sucker | 0.7573 | 10.9981 | 215 | 0.07 | 0.9452 | ||||
MBStory | Cruncher | Smoosher | 3.0151 | 8.5551 | 113 | 0.35 | 0.7252 | ||||
MBStory | Cruncher | Sucker | 1.5763 | 10.3464 | 161 | 0.15 | 0.8791 | ||||
MBStory | Smoosher | Sucker | -1.4388 | 12.4272 | 119 | -0.12 | 0.9080 | ||||
FoodType*MBStory | HighS | Chewer | HighS | Cruncher | 4.2794 | 8.3244 | 319 | 0.51 | 0.6076 | ||
FoodType*MBStory | HighS | Chewer | HighS | Smoosher | -5.0043 | 11.0635 | 136 | -0.45 | 0.6518 | ||
FoodType*MBStory | HighS | Chewer | HighS | Sucker | 4.2965 | 12.4293 | 322 | 0.35 | 0.7298 | ||
FoodType*MBStory | HighS | Chewer | LowS | Chewer | 4.9118 | 6.2542 | 887 | 0.79 | 0.4325 | ||
FoodType*MBStory | HighS | Chewer | LowS | Cruncher | -1.0057 | 8.3244 | 319 | -0.12 | 0.9039 | ||
FoodType*MBStory | HighS | Chewer | LowS | Smoosher | 14.3082 | 11.0635 | 136 | 1.29 | 0.1981 | ||
FoodType*MBStory | HighS | Chewer | LowS | Sucker | 2.1298 | 12.4293 | 322 | 0.17 | 0.8641 | ||
FoodType*MBStory | HighS | Cruncher | HighS | Smoosher | -9.2837 | 9.3784 | 160 | -0.99 | 0.3237 | ||
FoodType*MBStory | HighS | Cruncher | HighS | Sucker | 0.01710 | 11.6263 | 244 | 0.00 | 0.9988 | ||
FoodType*MBStory | HighS | Cruncher | LowS | Chewer | 0.6324 | 8.3244 | 319 | 0.08 | 0.9395 | ||
FoodType*MBStory | HighS | Cruncher | LowS | Cruncher | -5.2851 | 4.1832 | 887 | -1.26 | 0.2068 | ||
FoodType*MBStory | HighS | Cruncher | LowS | Smoosher | 10.0288 | 9.3784 | 160 | 1.07 | 0.2865 | ||
FoodType*MBStory | HighS | Cruncher | LowS | Sucker | -2.1496 | 11.6263 | 244 | -0.18 | 0.8535 | ||
FoodType*MBStory | HighS | Smoosher | HighS | Sucker | 9.3008 | 13.7323 | 173 | 0.68 | 0.4991 | ||
FoodType*MBStory | HighS | Smoosher | LowS | Chewer | 9.9160 | 11.0635 | 136 | 0.90 | 0.3717 | ||
FoodType*MBStory | HighS | Smoosher | LowS | Cruncher | 3.9986 | 9.3784 | 160 | 0.43 | 0.6704 | ||
FoodType*MBStory | HighS | Smoosher | LowS | Smoosher | 19.3125 | 6.4467 | 887 | 3.00 | 0.0028 | ||
FoodType*MBStory | HighS | Smoosher | LowS | Sucker | 7.1341 | 13.7323 | 173 | 0.52 | 0.6041 | ||
FoodType*MBStory | HighS | Sucker | LowS | Chewer | 0.6153 | 12.4293 | 322 | 0.05 | 0.9606 | ||
FoodType*MBStory | HighS | Sucker | LowS | Cruncher | -5.3022 | 11.6263 | 244 | -0.46 | 0.6488 | ||
FoodType*MBStory | HighS | Sucker | LowS | Smoosher | 10.0117 | 13.7323 | 173 | 0.73 | 0.4669 | ||
FoodType*MBStory | HighS | Sucker | LowS | Sucker | -2.1667 | 9.7465 | 887 | -0.22 | 0.8241 | ||
FoodType*MBStory | LowS | Chewer | LowS | Cruncher | -5.9175 | 8.3244 | 319 | -0.71 | 0.4777 | ||
FoodType*MBStory | LowS | Chewer | LowS | Smoosher | 9.3965 | 11.0635 | 136 | 0.85 | 0.3972 | ||
FoodType*MBStory | LowS | Chewer | LowS | Sucker | -2.7819 | 12.4293 | 322 | -0.22 | 0.8230 | ||
FoodType*MBStory | LowS | Cruncher | LowS | Smoosher | 15.3139 | 9.3784 | 160 | 1.63 | 0.1045 | ||
FoodType*MBStory | LowS | Cruncher | LowS | Sucker | 3.1355 | 11.6263 | 244 | 0.27 | 0.7876 | ||
FoodType*MBStory | LowS | Smoosher | LowS | Sucker | -12.1784 | 13.7323 | 173 | -0.89 | 0.3764 |
The Mixed Procedure
Model Information | |
---|---|
Data Set | WORK.STARCHSAS |
Dependent Variable | Desire to Eat |
Covariance Structure | Compound Symmetry |
Subject Effect | SubjectID |
Estimation Method | REML |
Residual Variance Method | Profile |
Fixed Effects SE Method | Kenward-Roger |
Degrees of Freedom Method | Kenward-Roger |
Class Level Information | ||
---|---|---|
Class | Levels | Values |
SubjectID | 38 | 1 2 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 22 23 24 26 28 29 30 31 32 34 35 36 37 38 39 40 42 43 44 |
OrderAssigned | 2 | HighLow LowHigh |
Gender | 2 | Female Male |
VisitType | 2 | End Start |
Interventionwk | 1 | Low |
Taste | 2 | Fail Pass |
Smell | 2 | Fail Pass |
FoodType | 2 | HighS LowS |
MBStory | 4 | Chewer Cruncher Smoosher Sucker |
MBPicture | 4 | Chewer Cruncher Smoosher Sucker |
Dimensions | |
---|---|
Covariance Parameters | 2 |
Columns in X | 20 |
Columns in Z | 0 |
Subjects | 38 |
Max Obs per Subject | 24 |
Number of Observations | |
---|---|
Number of Observations Read | 900 |
Number of Observations Used | 900 |
Number of Observations Not Used | 0 |
Iteration History | |||
---|---|---|---|
Iteration | Evaluations | -2 Res Log Like | Criterion |
0 | 1 | 9629.93412671 | |
1 | 2 | 9520.34304467 | 0.00000010 |
2 | 1 | 9520.34263570 | 0.00000000 |
Convergence criteria met. |
Covariance Parameter Estimates | ||
---|---|---|
Cov Parm | Subject | Estimate |
CS | SubjectID | 537.99 |
Residual | 2283.47 |
Fit Statistics | |
---|---|
-2 Res Log Likelihood | 9520.3 |
AIC (Smaller is Better) | 9524.3 |
AICC (Smaller is Better) | 9524.4 |
BIC (Smaller is Better) | 9527.6 |
Null Model Likelihood Ratio Test | ||
---|---|---|
DF | Chi-Square | Pr > ChiSq |
1 | 109.59 | <.0001 |
Solution for Fixed Effects | ||||||||
---|---|---|---|---|---|---|---|---|
Effect | VisitType | FoodType | MBStory | Estimate | Standard Error |
DF | t Value | Pr > |t| |
Intercept | -9.3994 | 13.1734 | 306 | -0.71 | 0.4761 | |||
Pudding40s | 2.1013 | 1.0801 | 357 | 1.95 | 0.0525 | |||
VisitType | End | 0.3054 | 9.5275 | 887 | 0.03 | 0.9744 | ||
VisitType | Start | 0 | . | . | . | . | ||
FoodType | HighS | -0.9048 | 10.4277 | 854 | -0.09 | 0.9309 | ||
FoodType | LowS | 0 | . | . | . | . | ||
MBStory | Chewer | -13.4485 | 14.0283 | 192 | -0.96 | 0.3389 | ||
MBStory | Cruncher | 0.8233 | 11.3605 | 384 | 0.07 | 0.9423 | ||
MBStory | Smoosher | -22.0703 | 12.7271 | 279 | -1.73 | 0.0840 | ||
MBStory | Sucker | 0 | . | . | . | . | ||
Pudding40s*VisitType | End | -0.6961 | 1.2545 | 888 | -0.55 | 0.5791 | ||
Pudding40s*VisitType | Start | 0 | . | . | . | . | ||
FoodType*MBStory | HighS | Chewer | 12.2024 | 12.7713 | 854 | 0.96 | 0.3396 | |
FoodType*MBStory | HighS | Cruncher | -5.1786 | 11.3965 | 854 | -0.45 | 0.6497 | |
FoodType*MBStory | HighS | Smoosher | 20.7844 | 12.2892 | 854 | 1.69 | 0.0911 | |
FoodType*MBStory | HighS | Sucker | 0 | . | . | . | . | |
FoodType*MBStory | LowS | Chewer | 0 | . | . | . | . | |
FoodType*MBStory | LowS | Cruncher | 0 | . | . | . | . | |
FoodType*MBStory | LowS | Smoosher | 0 | . | . | . | . | |
FoodType*MBStory | LowS | Sucker | 0 | . | . | . | . |
Type 3 Tests of Fixed Effects | ||||
---|---|---|---|---|
Effect | Num DF | Den DF | F Value | Pr > F |
Pudding40s | 1 | 226 | 3.05 | 0.0820 |
VisitType | 1 | 887 | 0.00 | 0.9744 |
FoodType | 1 | 854 | 2.58 | 0.1084 |
MBStory | 3 | 113 | 0.58 | 0.6304 |
Pudding40s*VisitType | 1 | 888 | 0.31 | 0.5791 |
FoodType*MBStory | 3 | 854 | 3.99 | 0.0078 |
Least Squares Means | ||||||||
---|---|---|---|---|---|---|---|---|
Effect | VisitType | FoodType | MBStory | Estimate | Standard Error |
DF | t Value | Pr > |t| |
VisitType | End | -4.8400 | 4.7594 | 55.6 | -1.02 | 0.3136 | ||
VisitType | Start | -0.2390 | 4.7413 | 54.4 | -0.05 | 0.9600 | ||
FoodType | HighS | 0.4841 | 4.8343 | 59.4 | 0.10 | 0.9206 | ||
FoodType | LowS | -5.5632 | 4.8343 | 59.4 | -1.15 | 0.2544 | ||
MBStory | Chewer | -4.6890 | 8.3125 | 65.3 | -0.56 | 0.5746 | ||
MBStory | Cruncher | 0.8923 | 5.2575 | 52.5 | 0.17 | 0.8659 | ||
MBStory | Smoosher | -9.0197 | 7.5332 | 55.9 | -1.20 | 0.2362 | ||
MBStory | Sucker | 2.6583 | 9.5121 | 148 | 0.28 | 0.7803 | ||
FoodType*MBStory | HighS | Chewer | 0.9598 | 9.0934 | 93.1 | 0.11 | 0.9162 | |
FoodType*MBStory | HighS | Cruncher | -2.1493 | 5.7382 | 74.3 | -0.37 | 0.7090 | |
FoodType*MBStory | HighS | Smoosher | 0.9201 | 8.2049 | 78.5 | 0.11 | 0.9110 | |
FoodType*MBStory | HighS | Sucker | 2.2060 | 10.8473 | 235 | 0.20 | 0.8390 | |
FoodType*MBStory | LowS | Chewer | -10.3378 | 9.0934 | 93.1 | -1.14 | 0.2585 | |
FoodType*MBStory | LowS | Cruncher | 3.9340 | 5.7382 | 74.3 | 0.69 | 0.4951 | |
FoodType*MBStory | LowS | Smoosher | -18.9595 | 8.2049 | 78.5 | -2.31 | 0.0235 | |
FoodType*MBStory | LowS | Sucker | 3.1107 | 10.8473 | 235 | 0.29 | 0.7745 |
Differences of Least Squares Means | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Effect | VisitType | FoodType | MBStory | _VisitType | _FoodType | _MBStory | Estimate | Standard Error |
DF | t Value | Pr > |t| |
VisitType | End | Start | -4.6010 | 3.3075 | 886 | -1.39 | 0.1646 | ||||
FoodType | HighS | LowS | 6.0473 | 3.7628 | 854 | 1.61 | 0.1084 | ||||
MBStory | Chewer | Cruncher | -5.5813 | 9.0528 | 105 | -0.62 | 0.5389 | ||||
MBStory | Chewer | Smoosher | 4.3307 | 11.1221 | 66.4 | 0.39 | 0.6982 | ||||
MBStory | Chewer | Sucker | -7.3473 | 12.4907 | 125 | -0.59 | 0.5574 | ||||
MBStory | Cruncher | Smoosher | 9.9121 | 8.7229 | 78.7 | 1.14 | 0.2593 | ||||
MBStory | Cruncher | Sucker | -1.7660 | 9.8281 | 247 | -0.18 | 0.8575 | ||||
MBStory | Smoosher | Sucker | -11.6781 | 11.1455 | 178 | -1.05 | 0.2962 | ||||
FoodType*MBStory | HighS | Chewer | HighS | Cruncher | 3.1091 | 10.0415 | 155 | 0.31 | 0.7573 | ||
FoodType*MBStory | HighS | Chewer | HighS | Smoosher | 0.03972 | 12.1600 | 94.4 | 0.00 | 0.9974 | ||
FoodType*MBStory | HighS | Chewer | HighS | Sucker | -1.2461 | 14.0283 | 192 | -0.09 | 0.9293 | ||
FoodType*MBStory | HighS | Chewer | LowS | Chewer | 11.2976 | 7.3735 | 854 | 1.53 | 0.1258 | ||
FoodType*MBStory | HighS | Chewer | LowS | Cruncher | -2.9742 | 10.0415 | 155 | -0.30 | 0.7675 | ||
FoodType*MBStory | HighS | Chewer | LowS | Smoosher | 19.9193 | 12.1600 | 94.4 | 1.64 | 0.1047 | ||
FoodType*MBStory | HighS | Chewer | LowS | Sucker | -2.1509 | 14.0283 | 192 | -0.15 | 0.8783 | ||
FoodType*MBStory | HighS | Cruncher | HighS | Smoosher | -3.0694 | 9.5888 | 114 | -0.32 | 0.7495 | ||
FoodType*MBStory | HighS | Cruncher | HighS | Sucker | -4.3553 | 11.3605 | 384 | -0.38 | 0.7017 | ||
FoodType*MBStory | HighS | Cruncher | LowS | Chewer | 8.1885 | 10.0415 | 155 | 0.82 | 0.4161 | ||
FoodType*MBStory | HighS | Cruncher | LowS | Cruncher | -6.0833 | 4.5982 | 854 | -1.32 | 0.1862 | ||
FoodType*MBStory | HighS | Cruncher | LowS | Smoosher | 16.8102 | 9.5888 | 114 | 1.75 | 0.0823 | ||
FoodType*MBStory | HighS | Cruncher | LowS | Sucker | -5.2601 | 11.3605 | 384 | -0.46 | 0.6436 | ||
FoodType*MBStory | HighS | Smoosher | HighS | Sucker | -1.2859 | 12.7271 | 279 | -0.10 | 0.9196 | ||
FoodType*MBStory | HighS | Smoosher | LowS | Chewer | 11.2579 | 12.1600 | 94.4 | 0.93 | 0.3569 | ||
FoodType*MBStory | HighS | Smoosher | LowS | Cruncher | -3.0139 | 9.5888 | 114 | -0.31 | 0.7539 | ||
FoodType*MBStory | HighS | Smoosher | LowS | Smoosher | 19.8796 | 6.5028 | 854 | 3.06 | 0.0023 | ||
FoodType*MBStory | HighS | Smoosher | LowS | Sucker | -2.1906 | 12.7271 | 279 | -0.17 | 0.8635 | ||
FoodType*MBStory | HighS | Sucker | LowS | Chewer | 12.5438 | 14.0283 | 192 | 0.89 | 0.3723 | ||
FoodType*MBStory | HighS | Sucker | LowS | Cruncher | -1.7280 | 11.3605 | 384 | -0.15 | 0.8792 | ||
FoodType*MBStory | HighS | Sucker | LowS | Smoosher | 21.1655 | 12.7271 | 279 | 1.66 | 0.0974 | ||
FoodType*MBStory | HighS | Sucker | LowS | Sucker | -0.9048 | 10.4277 | 854 | -0.09 | 0.9309 | ||
FoodType*MBStory | LowS | Chewer | LowS | Cruncher | -14.2718 | 10.0415 | 155 | -1.42 | 0.1572 | ||
FoodType*MBStory | LowS | Chewer | LowS | Smoosher | 8.6217 | 12.1600 | 94.4 | 0.71 | 0.4801 | ||
FoodType*MBStory | LowS | Chewer | LowS | Sucker | -13.4485 | 14.0283 | 192 | -0.96 | 0.3389 | ||
FoodType*MBStory | LowS | Cruncher | LowS | Smoosher | 22.8935 | 9.5888 | 114 | 2.39 | 0.0186 | ||
FoodType*MBStory | LowS | Cruncher | LowS | Sucker | 0.8233 | 11.3605 | 384 | 0.07 | 0.9423 | ||
FoodType*MBStory | LowS | Smoosher | LowS | Sucker | -22.0703 | 12.7271 | 279 | -1.73 | 0.0840 |
SwDiff = sas.sd2df('diffsw')
HaDiff = sas.sd2df('diffha')
ChDiff = sas.sd2df('diffch')
TeDiff = sas.sd2df('diffte')
DeDiff = sas.sd2df('diffde')
# PuddTests = sas.sd2df('tests1')
# PuddMeans = sas.sd2df('means1')
# PuddDiff.to_csv('./out/PuddDiff.csv')
# PuddTests.to_csv('./out/PuddTests.csv')
# PuddMeans.to_csv('./out/PuddMeans.csv')
%%SAS sas
proc sort data = starchsas;
by uopreporter visit shortname;
run;
title 'Pudding Baseline';
ods output diffs = diff1 tests3=tests1 lsmeans =means1
lsmESTIMATEs =Estim1 SolutionF= sol1;
Proc mixed data=starchsas;
by UOPreporter;
where uopreporter ne "O" and visittype = "Start" and shortname='Oreos' and subjectid ne 38;
*Oreos drops it to just one line of subject data, removes all the duplicates;
*removing subject 38 removes and outlier for BMI (their bmi was 37, everyone else is under 30),
this make BMI a trend instead of a significant effect;
class subjectID medsyn visit;
model pudding40s = medsyn BMI visit salivavolume
/ ddfm = kr solution; *residual?; *removed sugr iron zinc calc V_STARCHY_TOTAL G_TOTAL ;
repeated / subject = subjectID type = vc;
lsmeans medsyn / pdiff ADJDFE=ROW;
run;
The Mixed Procedure
Model Information | |
---|---|
Data Set | WORK.STARCHSAS |
Dependent Variable | Pudding40s |
Covariance Structure | Variance Components |
Subject Effect | SubjectID |
Estimation Method | REML |
Residual Variance Method | Parameter |
Fixed Effects SE Method | Kenward-Roger |
Degrees of Freedom Method | Kenward-Roger |
Class Level Information | ||
---|---|---|
Class | Levels | Values |
SubjectID | 24 | 1 2 4 6 7 9 11 15 17 18 19 21 26 27 29 30 32 33 34 35 36 37 39 43 |
MedsYN | 2 | N Y |
Visit | 2 | 1 3 |
Dimensions | |
---|---|
Covariance Parameters | 1 |
Columns in X | 7 |
Columns in Z | 0 |
Subjects | 24 |
Max Obs per Subject | 2 |
Number of Observations | |
---|---|
Number of Observations Read | 45 |
Number of Observations Used | 43 |
Number of Observations Not Used | 2 |
Iteration History | |||
---|---|---|---|
Iteration | Evaluations | -2 Res Log Like | Criterion |
0 | 1 | 201.21868862 | |
1 | 1 | 201.21868862 | 0.00000000 |
Convergence criteria met. |
Covariance Parameter Estimates | ||
---|---|---|
Cov Parm | Subject | Estimate |
Residual | SubjectID | 7.1280 |
Fit Statistics | |
---|---|
-2 Res Log Likelihood | 201.2 |
AIC (Smaller is Better) | 203.2 |
AICC (Smaller is Better) | 203.3 |
BIC (Smaller is Better) | 204.4 |
Null Model Likelihood Ratio Test | ||
---|---|---|
DF | Chi-Square | Pr > ChiSq |
0 | 0.00 | 1.0000 |
Solution for Fixed Effects | |||||||
---|---|---|---|---|---|---|---|
Effect | MedsYN | Visit | Estimate | Standard Error |
DF | t Value | Pr > |t| |
Intercept | 0.3244 | 3.5501 | 38 | 0.09 | 0.9277 | ||
MedsYN | N | -2.3405 | 0.8425 | 38 | -2.78 | 0.0084 | |
MedsYN | Y | 0 | . | . | . | . | |
BMI | 0.3771 | 0.1453 | 38 | 2.60 | 0.0133 | ||
Visit | 1 | -1.0437 | 0.8300 | 38 | -1.26 | 0.2163 | |
Visit | 3 | 0 | . | . | . | . | |
SalivaVolume | -0.6406 | 0.2870 | 38 | -2.23 | 0.0316 |
Type 3 Tests of Fixed Effects | ||||
---|---|---|---|---|
Effect | Num DF | Den DF | F Value | Pr > F |
MedsYN | 1 | 38 | 7.72 | 0.0084 |
BMI | 1 | 38 | 6.74 | 0.0133 |
Visit | 1 | 38 | 1.58 | 0.2163 |
SalivaVolume | 1 | 38 | 4.98 | 0.0316 |
Least Squares Means | ||||||
---|---|---|---|---|---|---|
Effect | MedsYN | Estimate | Standard Error |
DF | t Value | Pr > |t| |
MedsYN | N | 5.3822 | 0.5266 | 38 | 10.22 | <.0001 |
MedsYN | Y | 7.7227 | 0.6515 | 38 | 11.85 | <.0001 |
Differences of Least Squares Means | |||||||
---|---|---|---|---|---|---|---|
Effect | MedsYN | _MedsYN | Estimate | Standard Error |
DF | t Value | Pr > |t| |
MedsYN | N | Y | -2.3405 | 0.8425 | 38 | -2.78 | 0.0084 |
The Mixed Procedure
Model Information | |
---|---|
Data Set | WORK.STARCHSAS |
Dependent Variable | Pudding40s |
Covariance Structure | Variance Components |
Subject Effect | SubjectID |
Estimation Method | REML |
Residual Variance Method | Parameter |
Fixed Effects SE Method | Kenward-Roger |
Degrees of Freedom Method | Kenward-Roger |
Class Level Information | ||
---|---|---|
Class | Levels | Values |
SubjectID | 13 | 5 8 12 13 14 16 20 22 23 31 40 42 44 |
MedsYN | 2 | N Y |
Visit | 2 | 1 3 |
Dimensions | |
---|---|
Covariance Parameters | 1 |
Columns in X | 7 |
Columns in Z | 0 |
Subjects | 13 |
Max Obs per Subject | 2 |
Number of Observations | |
---|---|
Number of Observations Read | 26 |
Number of Observations Used | 24 |
Number of Observations Not Used | 2 |
Iteration History | |||
---|---|---|---|
Iteration | Evaluations | -2 Res Log Like | Criterion |
0 | 1 | 105.01426238 | |
1 | 1 | 105.01426238 | 0.00000000 |
Convergence criteria met. |
Covariance Parameter Estimates | ||
---|---|---|
Cov Parm | Subject | Estimate |
Residual | SubjectID | 6.2629 |
Fit Statistics | |
---|---|
-2 Res Log Likelihood | 105.0 |
AIC (Smaller is Better) | 107.0 |
AICC (Smaller is Better) | 107.2 |
BIC (Smaller is Better) | 107.6 |
Null Model Likelihood Ratio Test | ||
---|---|---|
DF | Chi-Square | Pr > ChiSq |
0 | 0.00 | 1.0000 |
Solution for Fixed Effects | |||||||
---|---|---|---|---|---|---|---|
Effect | MedsYN | Visit | Estimate | Standard Error |
DF | t Value | Pr > |t| |
Intercept | 12.6358 | 3.2026 | 19 | 3.95 | 0.0009 | ||
MedsYN | N | -0.6955 | 1.1458 | 19 | -0.61 | 0.5511 | |
MedsYN | Y | 0 | . | . | . | . | |
BMI | -0.1338 | 0.08266 | 19 | -1.62 | 0.1219 | ||
Visit | 1 | 0.2227 | 1.0650 | 19 | 0.21 | 0.8366 | |
Visit | 3 | 0 | . | . | . | . | |
SalivaVolume | -1.5019 | 0.7314 | 19 | -2.05 | 0.0540 |
Type 3 Tests of Fixed Effects | ||||
---|---|---|---|---|
Effect | Num DF | Den DF | F Value | Pr > F |
MedsYN | 1 | 19 | 0.37 | 0.5511 |
BMI | 1 | 19 | 2.62 | 0.1219 |
Visit | 1 | 19 | 0.04 | 0.8366 |
SalivaVolume | 1 | 19 | 4.22 | 0.0540 |
Least Squares Means | ||||||
---|---|---|---|---|---|---|
Effect | MedsYN | Estimate | Standard Error |
DF | t Value | Pr > |t| |
MedsYN | N | 6.5528 | 0.7057 | 19 | 9.29 | <.0001 |
MedsYN | Y | 7.2483 | 0.8365 | 19 | 8.67 | <.0001 |
Differences of Least Squares Means | |||||||
---|---|---|---|---|---|---|---|
Effect | MedsYN | _MedsYN | Estimate | Standard Error |
DF | t Value | Pr > |t| |
MedsYN | N | Y | -0.6955 | 1.1458 | 19 | -0.61 | 0.5511 |