<?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 Re: Automatically set start values in nlmixed in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Automatically-set-start-values-in-nlmixed/m-p/469912#M24448</link>
    <description>&lt;P&gt;For the most help, please provide sample code and sample data for your questions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I understand your questions, the answer is "yes." You can first compute the parameter estimates for a fixed-effect model and then use those estimates as starting values for a random effects model. For example, the&amp;nbsp;PROC NLMIXED documentation contains data and&amp;nbsp;&lt;A href="http://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_nlmixed_examples02.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en" target="_self"&gt;an example of a random-effects model for the size of a rat litter.&lt;/A&gt;&amp;nbsp; If you ignore the random effect and replace that effect with 0 (its mean value), then the fixed effect model is as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc nlmixed data=rats;
   parms t1=1 t2=1;
   eta = x1*t1 + x2*t2;
   p   = probnorm(eta);
   model x ~ binomial(m,p);
   ods output ParameterEstimates = PE;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Notice that &lt;A href="https://blogs.sas.com/content/iml/2017/01/09/ods-output-any-statistic.html" target="_self"&gt;the ODS OUTPUT statement saves the parameter estimates to a data set.&lt;/A&gt;&amp;nbsp; For the full random-effect model, you can use the DATA= option on the PARMS statement to read in the estimates from the fixed-effect model:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* full random-effects model. The starting values for the fixed effects
   are the estimates from the fixed-effect-only model */
proc nlmixed data=rats;
   parms s1=.05 s2=1 / data=PE;   /* read in initial values for t1, t2 */
   eta = x1*t1 + x2*t2 + alpha;
   p   = probnorm(eta);
   model x ~ binomial(m,p);
   random alpha ~ normal(0,x1*s1*s1+x2*s2*s2) subject=litter;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 13 Jun 2018 13:03:17 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2018-06-13T13:03:17Z</dc:date>
    <item>
      <title>Automatically set start values in nlmixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Automatically-set-start-values-in-nlmixed/m-p/469790#M24447</link>
      <description>&lt;P&gt;Dear All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At this moment I am running several non-linear mixed models with proc nlmixed.&lt;/P&gt;&lt;P&gt;However, due to the complexity of the models, I have to set the start&amp;nbsp;values with the parameters of the same model but without random effects.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to save the parameters estimates from the model without random effects and use them on the final model?&lt;/P&gt;&lt;P&gt;Thanks in advance for any advise.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Johanna&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 07:58:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Automatically-set-start-values-in-nlmixed/m-p/469790#M24447</guid>
      <dc:creator>johamunoza0</dc:creator>
      <dc:date>2018-06-13T07:58:23Z</dc:date>
    </item>
    <item>
      <title>Re: Automatically set start values in nlmixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Automatically-set-start-values-in-nlmixed/m-p/469912#M24448</link>
      <description>&lt;P&gt;For the most help, please provide sample code and sample data for your questions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I understand your questions, the answer is "yes." You can first compute the parameter estimates for a fixed-effect model and then use those estimates as starting values for a random effects model. For example, the&amp;nbsp;PROC NLMIXED documentation contains data and&amp;nbsp;&lt;A href="http://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_nlmixed_examples02.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en" target="_self"&gt;an example of a random-effects model for the size of a rat litter.&lt;/A&gt;&amp;nbsp; If you ignore the random effect and replace that effect with 0 (its mean value), then the fixed effect model is as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc nlmixed data=rats;
   parms t1=1 t2=1;
   eta = x1*t1 + x2*t2;
   p   = probnorm(eta);
   model x ~ binomial(m,p);
   ods output ParameterEstimates = PE;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Notice that &lt;A href="https://blogs.sas.com/content/iml/2017/01/09/ods-output-any-statistic.html" target="_self"&gt;the ODS OUTPUT statement saves the parameter estimates to a data set.&lt;/A&gt;&amp;nbsp; For the full random-effect model, you can use the DATA= option on the PARMS statement to read in the estimates from the fixed-effect model:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* full random-effects model. The starting values for the fixed effects
   are the estimates from the fixed-effect-only model */
proc nlmixed data=rats;
   parms s1=.05 s2=1 / data=PE;   /* read in initial values for t1, t2 */
   eta = x1*t1 + x2*t2 + alpha;
   p   = probnorm(eta);
   model x ~ binomial(m,p);
   random alpha ~ normal(0,x1*s1*s1+x2*s2*s2) subject=litter;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Jun 2018 13:03:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Automatically-set-start-values-in-nlmixed/m-p/469912#M24448</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-06-13T13:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: Automatically set start values in nlmixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Automatically-set-start-values-in-nlmixed/m-p/471506#M24560</link>
      <description>&lt;P&gt;Dear Rick&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much, it is exactly what i need it.&lt;/P&gt;&lt;P&gt;Have a nice day,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Johanna&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 19:58:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Automatically-set-start-values-in-nlmixed/m-p/471506#M24560</guid>
      <dc:creator>johamunoza0</dc:creator>
      <dc:date>2018-06-19T19:58:57Z</dc:date>
    </item>
  </channel>
</rss>

