I am using the SAS OnDemand for Academics (free online version), I have attached a portion of my code. The only error code I am getting is that there is missing or invalid data but I'm not sure where that would be coming from. It will also give a NOTE: Invalid data for DAP in line 144 1-18. which repeats for YEAR in line 145 1-18, PLOT in line 146 1-17, REP in line 147 1-17, TRT in line 148 1-17, NDVI in line 149 1-17 and this pattern repeats through the code. Any advice would be welcome!
data alldata; input DAP YEAR PLOT REP TRT NDVI; datalines; 114 1 402 4 3 0 114 1 403 4 2 0 114 1 404 4 1 0 125 2 401 4 2 0.855 125 2 402 4 3 0.825 125 2 403 4 4 0.815 119 3 303 3 3 0.69 119 3 304 3 2 0.775 119 3 403 4 4 0.705 ; run; proc sort data=alldata; BY Year DAP; proc glimmix data = alldata; BY Year DAP; class REP TRT; model NDVI = TRT; random REP; lsmeans TRT / lines; run;
I had no trouble running your code in SAS Ondemand - I did get the following warning messages in the log for proc glimmix:
Thank you for running it, I had to make sure it wasn't a code issue before going further! It turns out that in the free SAS OnDemand, the tabs/cells when copied over from any sort of sheet is not recognized as spaces and the program reads it as one long line of code.
My first suggestion is to remove this statement from within the PROC GLIMMIX code:
BY Year DAP;
This fits a separate model for every unique combination of Year and DAP. The data you provided has three unique combinations of Year and DAP with three observations within each combination. So- you are fitting three separate models, each estimated with only three observations. Three observations isn't enough to fit a model well.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Ready to level-up your skills? Choose your own adventure.