BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
sohelsayma
Obsidian | Level 7

 

Dear All,

I was trying to model the climate data (temperature) trend over time for combined sites using LMM Proc Mixed. I have 60 sites.  For each site I have temperature data from 1950-2000. I would like to see if the temperature trend is increasing or decreasing for all this 60 plot. To do this I would like to apply Proc Mixed. I have written the following code but its not working. There is no result at all. There is an error called "ERROR 180-322: Statement is not valid or it is used out of proper order."Can you please help me. Thanks

proc mixed data= climate data;
   plot year temp;
   model year =  plot temp plot*temp;
run;

 

1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

You seem to have mixed (no pun) a few things. Try 

 

proc mixed data= climate;
   class plot;
   model temp =  plot plot*year;
run;
PG

View solution in original post

8 REPLIES 8
ballardw
Super User

When code is "not working" please describe how it is not working or any symptoms.

If there are error messages post the entire error message, preferably with the log contents.

Is there no result at all? Are the results unexpected? Provide example data that duplicates the behavior if you cannot provide the actual data. Describe how the results are unexpected?

 

sohelsayma
Obsidian | Level 7
Sorry for not explaining clearly. There is no result at all. There is an error called "ERROR 180-322: Statement is not valid or it is used out of proper order."
Rick_SAS
SAS Super FREQ

There is no PLOT statement in PROC MIXED. Use the PLOTS= option on the PROC MIXED statement to reques ODS statistical graphics.

sohelsayma
Obsidian | Level 7
Thanks for your reply. Actually I am very new in SAS. Just started 1 week ago. If you can write the than it is easy for me to understand. Sorry for the inconvenience.
PGStats
Opal | Level 21

You seem to have mixed (no pun) a few things. Try 

 

proc mixed data= climate;
   class plot;
   model temp =  plot plot*year;
run;
PG
sohelsayma
Obsidian | Level 7
Thanks a lot. I cant tell you how you saved me. Stay fine and healthy. Thanks again.
ballardw
Super User

And in obnoxious data mode (mine) - Are the sites where the data is measured exactly the same over the entire period time?

 

One reason to ask is that many municipal temperature datasets have earlier data collected at the city hall or main post office but when an airport was built, or became a certain size, the location was moved to the airport. The asphalt/concrete and limited vegetation around airports tend to have a different temperature regime than the previous site.

 

There is a commercially available data source with solar radiation data from the 1960's to 1990's that if not concerned carefully shows a noticeable "global dimming trend" as the instruments were often not well cleaned after installation and accumulated grime obstructed part of the measurement. So I implore folks to "Know thine instruments" before doing any modeling.

sohelsayma
Obsidian | Level 7
Thanks for raising this issue. The data set I have is obtained from a from Worldclim data set. The sites are a forest area where elevation, tree species composition are homogeneous. As there is lack of climate station so we had to depend on global data set called worldclim. Thanks

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

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

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 8 replies
  • 2137 views
  • 1 like
  • 4 in conversation