DATA CombinedTiWORKING;
INFILE 'C:\Users\amurr\Documents\PhD\Variable Frame Forage Finish\SAS Files\Combined Ti working.prn' firstobs=2;
INPUT VID YEAR GROUP SIRE$ SEX$ TRMT$ FRAME$ SUPPLEMENT$ PERIOD gTi_gFecesDM gFecalOutput kgPERdayForageDMI;
PROC print;
RUN;
PROC MIXED;
Class Year Group Sire Sex TRMT Period;
Model kgPERdayForageDMI=Year Sire Sex TRMT|Period;
random Group;
REPEATED/type= TOEP r rcorr subject=VID(period);
lsmeans TRMT TRMT*Period/pdiff=ALL adjust=TUKEY;
SLICE TRMT*Period/SLICEBY=period diff adjust=TUKEY;
RUN;
PROC MIXED;
Class Year Group Sire Sex TRMT Period;
Model kgPERdayForageDMI=Year Sire Sex TRMT|Period;
random Group;
REPEATED/type= TOEP r rcorr subject=VID(period);
lsmeans Period Year/pdiff=ALL adjust=TUKEY;
RUN;
QUIT; Please help me understand why SAS won't run analysis on one of my categorical variables. Experiment background: This was a 2x2 study looking at how cattle frame size (large vs. small) and feeding regiment (only pasture vs. pasture + supplemented feed) influenced animal growth, forage utilization, and meat characteristics. This study ran 2 years with different sets of cattle in year 1 and year 2. This particular analysis was looking at forage intake as measured by titanium concentration in feces. In year 1 there were 2 different periods of fecal collection, and in year 2 there were 3 different periods of fecal collection. The same cattle were used for both fecal collections in year 1, and the same cattle were used in all 3 fecal collections in year 2, so I ran this as a repeated measure using PROC MIXED and split it by period. My problem is...I can not get SAS to analyze the data by year (code included). If I remove "YEAR" from the CLASS, MODEL, and LSMEANS statements in the included code everything runs fine, but I don't understand why I can't get a year 1 vs. year 2 analysis. The weird part is SAS recognizes YEAR in PROC PRINT (picture 1), read all of my observations and recognizes YEAR as a categorical variable (picture 2), but does not recognize YEAR as a fixed effect (picture 3). I've tried going back to my excel file and defining the YEAR data column as both "number" and "general" but there is no difference. Any recommendations are greatly appreciated!
... View more