BookmarkSubscribeRSS Feed
s-k
Calcite | Level 5 s-k
Calcite | Level 5

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;
4 REPLIES 4
tom_grant
SAS Super FREQ

I had no trouble running your code in SAS Ondemand - I did get the following warning messages in the log for proc glimmix:

 

WARNING: Mixed model has saturated mean and profiled variance. Fit does not proceed.
NOTE: The above message was for the following BY group:
YEAR=1 DAP=114
WARNING: Mixed model has saturated mean and profiled variance. Fit does not proceed.
NOTE: The above message was for the following BY group:
YEAR=2 DAP=125
WARNING: Mixed model has saturated mean and profiled variance. Fit does not proceed.
NOTE: The above message was for the following BY group:
YEAR=3 DAP=119

 

 

 

s-k
Calcite | Level 5 s-k
Calcite | Level 5

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. 

JackieJ_SAS
SAS Employee

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.

Ksharp
Super User
Your data is too small that would lead to a sparse problem for your model .

BY Year DAP;
would split your dataset into many sub-dataset.


random REP;
that would take REP as a SUBJECT= variable(cluster variable).

All of these is to say you don't have enough data to buid a Mixed Model.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1373 views
  • 2 likes
  • 4 in conversation