<?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 Specifying random effects in Predicitve Reggression Models in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Specifying-random-effects-in-Predicitve-Reggression-Models/m-p/394493#M20616</link>
    <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to SAS and need help with a rather complex dataset that I have. &amp;nbsp;Basically, &amp;nbsp;I have four classification variables&amp;nbsp; and I want test the intereaction between them all (all 2 and 3-way interactions). &amp;nbsp;However, in order to select the best model for my analysis, I want to use the stepwise backward eliminaton reggression tool in the Predicitive Regression Model task (proc glmselect) to select the best model using the AIC criteria. &amp;nbsp; &amp;nbsp;I've managed to successfully do this with my dataset, however I have two issues:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) &amp;nbsp;I need to specify a random effect in the model but there is no way to select one in the UI of the PRM task. &amp;nbsp;Do I need to specify this in the code and is it possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code so far:&lt;/P&gt;&lt;PRE&gt;proc glmselect data=WORK.IMPORT outdesign(addinputvars)=Work.Glmselect_Design 
		plots=(criterionpanel(unpack) coefficientpanel);
	class Pre Post Adult Age / param=glm;
	model Caspase3=Pre Post Adult Age Pre*Post Pre*Adult Pre*Age Post*Adult 
		Post*Age Adult*Age Pre*Post*Adult Pre*Post*Age Pre*Adult*Age Post*Adult*Age / 
		stb selection=backward
(select=aic stop=aic choose=aic) hierarchy=single details=steps(anova fitstats);
	score out=WORK.Glmselect_stats predicted residual;
run;

proc reg data=Work.Glmselect_Design plots(only)=(diagnostics residuals 
		observedbypredicted);
	ods select DiagnosticsPanel ResidualPlot ObservedByPredicted;
	where Pre is not missing &amp;amp; Post is not missing &amp;amp; Adult is not missing &amp;amp; Age is 
		not missing;
	model Caspase3=&amp;amp;_GLSMOD /;
	run;
quit;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) &amp;nbsp;Is there also a way to specify the distribution of the response as the majortiy of my datasets have residuals which not normally distributed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also on a sidenote, in the mixed model task (proc mixed), is there a way to specify the distribution here also?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;</description>
    <pubDate>Sun, 10 Sep 2017 07:39:22 GMT</pubDate>
    <dc:creator>djw23</dc:creator>
    <dc:date>2017-09-10T07:39:22Z</dc:date>
    <item>
      <title>Specifying random effects in Predicitve Reggression Models</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Specifying-random-effects-in-Predicitve-Reggression-Models/m-p/394493#M20616</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to SAS and need help with a rather complex dataset that I have. &amp;nbsp;Basically, &amp;nbsp;I have four classification variables&amp;nbsp; and I want test the intereaction between them all (all 2 and 3-way interactions). &amp;nbsp;However, in order to select the best model for my analysis, I want to use the stepwise backward eliminaton reggression tool in the Predicitive Regression Model task (proc glmselect) to select the best model using the AIC criteria. &amp;nbsp; &amp;nbsp;I've managed to successfully do this with my dataset, however I have two issues:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) &amp;nbsp;I need to specify a random effect in the model but there is no way to select one in the UI of the PRM task. &amp;nbsp;Do I need to specify this in the code and is it possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code so far:&lt;/P&gt;&lt;PRE&gt;proc glmselect data=WORK.IMPORT outdesign(addinputvars)=Work.Glmselect_Design 
		plots=(criterionpanel(unpack) coefficientpanel);
	class Pre Post Adult Age / param=glm;
	model Caspase3=Pre Post Adult Age Pre*Post Pre*Adult Pre*Age Post*Adult 
		Post*Age Adult*Age Pre*Post*Adult Pre*Post*Age Pre*Adult*Age Post*Adult*Age / 
		stb selection=backward
(select=aic stop=aic choose=aic) hierarchy=single details=steps(anova fitstats);
	score out=WORK.Glmselect_stats predicted residual;
run;

proc reg data=Work.Glmselect_Design plots(only)=(diagnostics residuals 
		observedbypredicted);
	ods select DiagnosticsPanel ResidualPlot ObservedByPredicted;
	where Pre is not missing &amp;amp; Post is not missing &amp;amp; Adult is not missing &amp;amp; Age is 
		not missing;
	model Caspase3=&amp;amp;_GLSMOD /;
	run;
quit;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) &amp;nbsp;Is there also a way to specify the distribution of the response as the majortiy of my datasets have residuals which not normally distributed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also on a sidenote, in the mixed model task (proc mixed), is there a way to specify the distribution here also?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Sun, 10 Sep 2017 07:39:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Specifying-random-effects-in-Predicitve-Reggression-Models/m-p/394493#M20616</guid>
      <dc:creator>djw23</dc:creator>
      <dc:date>2017-09-10T07:39:22Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying random effects in Predicitve Reggression Models</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Specifying-random-effects-in-Predicitve-Reggression-Models/m-p/394856#M20617</link>
      <description>&lt;P&gt;1. If you want model selection in generalized linear models (link functions for response&amp;nbsp;distributions), you can&amp;nbsp;use&lt;A href="http://go.documentation.sas.com/?cdcId=statcdc&amp;amp;cdcVersion=14.2&amp;amp;docsetId=stathpug&amp;amp;docsetTarget=stathpug_hpgenselect_overview01.htm&amp;amp;locale=en" target="_self"&gt; the HPGENSELECT procedure.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;2. SAS does not support automated variable selection for mixed models. However, some SAS programmers have wrapped macro code around SAS procedures to create their own selection algorithms. I don't recommend this approach, but you can find the papers in the SAS conference proceedings via an internet search for&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;model selection mixed site:sas.com/proceedings&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 19:03:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Specifying-random-effects-in-Predicitve-Reggression-Models/m-p/394856#M20617</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-09-11T19:03:10Z</dc:date>
    </item>
  </channel>
</rss>

