Programming the statistical procedures from SAS

Proc mixed LMM code for model temperature trend over time

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 19
Accepted Solution

Proc mixed LMM code for model temperature trend over time

[ Edited ]

 

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;

 


Accepted Solutions
Solution
‎01-15-2016 01:41 PM
Respected Advisor
Posts: 4,745

Re: Proc mixed LMM code for model temperature trend over time

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


All Replies
Super User
Posts: 10,843

Re: Proc LMM code for model temperature trend over time

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?

 

Occasional Contributor
Posts: 19

Re: Proc LMM code for model temperature trend over time

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."
SAS Super FREQ
Posts: 3,543

Re: Proc mixed LMM code for model temperature trend over time

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

Occasional Contributor
Posts: 19

Re: Proc mixed LMM code for model temperature trend over time

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.
Solution
‎01-15-2016 01:41 PM
Respected Advisor
Posts: 4,745

Re: Proc mixed LMM code for model temperature trend over time

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

 

proc mixed data= climate;
   class plot;
   model temp =  plot plot*year;
run;
PG
Occasional Contributor
Posts: 19

Re: Proc mixed LMM code for model temperature trend over time

Thanks a lot. I cant tell you how you saved me. Stay fine and healthy. Thanks again.
Super User
Posts: 10,843

Re: Proc mixed LMM code for model temperature trend over time

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.

Occasional Contributor
Posts: 19

Re: Proc mixed LMM code for model temperature trend over time

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
☑ This topic is solved.

Need further help from the community? Please ask a new question.

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