<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Proc MIXED- including continuous variables in analysis in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Proc-MIXED-including-continuous-variables-in-analysis/m-p/339343#M63149</link>
    <description>&lt;P&gt;I am using a split-plot, RCBD to study soil gas efflux, and analyze it with PROC MIXED. Fert is the main-plot (N=4), Nfix is the sub-plot (n=4). It is a repeated measure by Date. PlotID idntifies each of the 16 plots by its Fert*Nfix treatment. Fert, Nfix, Block, Date, PlotID are all categorical variables, either Y or N or an integer. SAS returns a detailed analysis with no erros in the log.&lt;/P&gt;&lt;P&gt;However, when i try to analyze this data by inserting a conitnuous variable, VWC (soil moisture), i run into problems. If if i do not include VWC in the Class statement, and only in the Model statement, i get: "&lt;SPAN&gt;ERROR: Only CLASS variables allowed in this effect." However, if i include VWC in the Class statement, it treats each VWC measurement as a treatment, and nearly crashes the computer due to the LSMeans comparison trying to compare each of ~500 measurements.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How do include a continuous variable in my analysis without getting a Class variable error or including it in the Class statement?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(code)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;proc mixed;&lt;BR /&gt;Class Block Fert Nfix Date PlotID;&lt;BR /&gt;Model logCH4= Fert&amp;nbsp;Nfix&amp;nbsp;Fert*Nfix&amp;nbsp;Date&amp;nbsp;Date*Fert&amp;nbsp;Date*Nfix;&lt;BR /&gt;Random Block Fert*Block;&lt;BR /&gt;Repeated Date / subject=plotID Type=CS;&lt;BR /&gt;lsmeans Fert Nfix Nfix*Fert Date Date*Fert Date*Nfix/pdiff adjust=tukey;&lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Wed, 08 Mar 2017 18:31:25 GMT</pubDate>
    <dc:creator>AaronJ</dc:creator>
    <dc:date>2017-03-08T18:31:25Z</dc:date>
    <item>
      <title>Proc MIXED- including continuous variables in analysis</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-MIXED-including-continuous-variables-in-analysis/m-p/339343#M63149</link>
      <description>&lt;P&gt;I am using a split-plot, RCBD to study soil gas efflux, and analyze it with PROC MIXED. Fert is the main-plot (N=4), Nfix is the sub-plot (n=4). It is a repeated measure by Date. PlotID idntifies each of the 16 plots by its Fert*Nfix treatment. Fert, Nfix, Block, Date, PlotID are all categorical variables, either Y or N or an integer. SAS returns a detailed analysis with no erros in the log.&lt;/P&gt;&lt;P&gt;However, when i try to analyze this data by inserting a conitnuous variable, VWC (soil moisture), i run into problems. If if i do not include VWC in the Class statement, and only in the Model statement, i get: "&lt;SPAN&gt;ERROR: Only CLASS variables allowed in this effect." However, if i include VWC in the Class statement, it treats each VWC measurement as a treatment, and nearly crashes the computer due to the LSMeans comparison trying to compare each of ~500 measurements.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How do include a continuous variable in my analysis without getting a Class variable error or including it in the Class statement?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(code)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;proc mixed;&lt;BR /&gt;Class Block Fert Nfix Date PlotID;&lt;BR /&gt;Model logCH4= Fert&amp;nbsp;Nfix&amp;nbsp;Fert*Nfix&amp;nbsp;Date&amp;nbsp;Date*Fert&amp;nbsp;Date*Nfix;&lt;BR /&gt;Random Block Fert*Block;&lt;BR /&gt;Repeated Date / subject=plotID Type=CS;&lt;BR /&gt;lsmeans Fert Nfix Nfix*Fert Date Date*Fert Date*Nfix/pdiff adjust=tukey;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2017 18:31:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-MIXED-including-continuous-variables-in-analysis/m-p/339343#M63149</guid>
      <dc:creator>AaronJ</dc:creator>
      <dc:date>2017-03-08T18:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: Proc MIXED- including continuous variables in analysis</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-MIXED-including-continuous-variables-in-analysis/m-p/339348#M63150</link>
      <description>&lt;P&gt;Did you make sure that your&amp;nbsp;&lt;STRONG&gt;VWC&amp;nbsp;&lt;/STRONG&gt;variable is actually numeric? Check the formatting on that one. It sounds like it's asking you why you've put a&amp;nbsp;&lt;EM&gt;Character&amp;nbsp;&lt;/EM&gt;variable in the model statement, without declaring it in the&amp;nbsp;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;Class&lt;/FONT&gt;&amp;nbsp;&lt;/STRONG&gt;statement first. See if that wasn't the case, because what you are trying to do should work just fine.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, I'm a real fan of&amp;nbsp;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;HPMIXED&lt;/FONT&gt;,&amp;nbsp;&lt;/STRONG&gt;try using that ( I think it's apart of SAS/STAT)...that thing is beast-mode when it comes to processing data. Your model times will (should) drastically decrease. Especially&amp;nbsp;when you have many/crossed random + repeated effects. But I don't think you can get the&amp;nbsp;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;Adjustment&lt;/FONT&gt;&amp;nbsp;&lt;/EM&gt; option in &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;LSMEANS&lt;/STRONG&gt;&lt;/FONT&gt; with &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;HPMIXED&lt;/STRONG&gt;&lt;/FONT&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bonus round:&amp;nbsp;You could use&amp;nbsp;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;HPMIXED&lt;/FONT&gt;&amp;nbsp;&lt;/STRONG&gt;to obtain starting points for the CovarianceParameter estimation...then pass those along to &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;Proc Glimmix&lt;/STRONG&gt;&lt;/FONT&gt;, just in case you find that your data are non-normally distributed. Likewise, you can pass them into &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;Proc Mixed&amp;nbsp;&lt;/STRONG&gt;&lt;FONT color="#000000"&gt;as well, in order to get the &lt;EM&gt;Tukey&lt;/EM&gt; adjustment in the &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;LSMEANS&lt;/STRONG&gt;&lt;/FONT&gt; statement.&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just for reference, it would look something like this?? I'm not exactly sure...the important part is using a fast procedure like &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;HPMIXED &lt;/STRONG&gt;&lt;/FONT&gt;to generate CovParms to pass into &lt;FONT color="#0000ff"&gt;some other Proc...&lt;/FONT&gt;it's pretty powerful!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods output close;
Proc Hpmixed;
	Class Block Fert Nfix Date PlotID;
	Model logCH4= Fert Nfix Date
			Fert*Nfix Date*Fert Date*Nfix;
	Random Block Fert*Block;
	Repeated Date / subject=plotID Type=CS;
	ods output CovParms=Parms;
run;
quit;

proc Glimmix;
	Class Block Fert Nfix Date PlotID;
	Model logCH4= Fert Nfix Date 
			Fert*Nfix Date*Fert Date*Nfix 
			/dist=Normal link=identity;
	Random Block Fert*Block;
	Random Date / subject=plotID Type=ar(1) residual;
	parms parmsdata=Parms;
	lsmeans Fert Nfix Nfix*Fert Date Date*Fert Date*Nfix/pdiff adjust=tukey;
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2017 19:20:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-MIXED-including-continuous-variables-in-analysis/m-p/339348#M63150</guid>
      <dc:creator>lkeyes</dc:creator>
      <dc:date>2017-03-08T19:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: Proc MIXED- including continuous variables in analysis</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-MIXED-including-continuous-variables-in-analysis/m-p/339376#M63151</link>
      <description>&lt;P&gt;Thanks for the enthusiastic response!&lt;/P&gt;&lt;P&gt;One question: the VWC column does have some empty cells, when the soil moisture meter failed on certain measurements. Does this affect the ability of MIXED to analyze the data? Ie., will i need to tell SAS to ignore empty cells?&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2017 19:37:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-MIXED-including-continuous-variables-in-analysis/m-p/339376#M63151</guid>
      <dc:creator>AaronJ</dc:creator>
      <dc:date>2017-03-08T19:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: Proc MIXED- including continuous variables in analysis</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-MIXED-including-continuous-variables-in-analysis/m-p/339402#M63153</link>
      <description>&lt;P&gt;No problem!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So,&amp;nbsp;&lt;STRONG&gt;Mixed&lt;/STRONG&gt; (as well as all other Stat Procs, im pretty sure) is just going to ignore those records that have blank fields that are either in your: Response or model variables.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It will give you a warning note like: "&lt;FONT color="#0000FF"&gt;Some observations are not used in the analysis because of missing fixed effects (n=10)&lt;/FONT&gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;shouldn't be a big deal though, unless you're missing a ton of records.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2017 20:05:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-MIXED-including-continuous-variables-in-analysis/m-p/339402#M63153</guid>
      <dc:creator>lkeyes</dc:creator>
      <dc:date>2017-03-08T20:05:52Z</dc:date>
    </item>
  </channel>
</rss>

