<?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: Slow nlmixed estimation in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Slow-nlmixed-estimation/m-p/184085#M9561</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, the 'a' variables should all be included on the zinb_p definition.&amp;nbsp; These model the zero inflation portion.&amp;nbsp; The ln variable is the offset, or the log of the days enrolled in school (here in my example), as some subjects have differing number of days that they can be suspended.&amp;nbsp; I'll look into the optcheck feature.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 Dec 2013 16:36:09 GMT</pubDate>
    <dc:creator>jsberger</dc:creator>
    <dc:date>2013-12-31T16:36:09Z</dc:date>
    <item>
      <title>Slow nlmixed estimation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Slow-nlmixed-estimation/m-p/184081#M9557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a hierarchically structured data set with count outcomes across approximately 75,000 records (nested within about 68 level-2 units).&amp;nbsp; I've utilized completely unconditional models to explore model fit, looking at poisson, negative binomial, and the zero-inflated flavors of both of these.&amp;nbsp; Based on model fit values, graphical depictions, etc., the data appear to be zero-inflated negative binomial. Now, of course, i would like to proceed exploring related predictors of both the zero-inflated portion and the negative binomial processes.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have about 10 predictors that i want to explore, based on both theory and use of a multi-level logistic and negative binomial models via glimmix to establish ballpark starting values. I submitted a model with these predictors, including starting values, a few days ago and it's still churning.&amp;nbsp; Am i asking too much (i.e. the model is too complex) given the size of the data?&amp;nbsp; Is there any way i can speed things up?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Dec 2013 11:31:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Slow-nlmixed-estimation/m-p/184081#M9557</guid>
      <dc:creator>jsberger</dc:creator>
      <dc:date>2013-12-30T11:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: Slow nlmixed estimation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Slow-nlmixed-estimation/m-p/184082#M9558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you looked at the SAS-L archives for NLMIXED posts, especially those by Dale McLerran, Matt Zack and David Cassell?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am going to guess that reparameterization so that boundary effects are not as noticeable is what needs to be done.&amp;nbsp; Also worrisome would be some sort of quasi-separation for the probability of a zero across the level-2 units.&amp;nbsp; If that happens, well, there is the R package glmer(), but I don't think you would be happy with that either, as I don't think you will be able to load everything into RAM, given the data and the possible size of the matrixes involved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, if reparameterizing doesn't work, then you might have to go for a Bayesian approach that uses Monte Carlo methods.&amp;nbsp; What is the parameterization you are currently using, if you don't mind sharing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Dec 2013 17:22:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Slow-nlmixed-estimation/m-p/184082#M9558</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2013-12-30T17:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: Slow nlmixed estimation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Slow-nlmixed-estimation/m-p/184083#M9559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's the code i've been using...any insights for improvements are greatly appreciated:&lt;/P&gt;&lt;P&gt;proc nlmixed data=mtest.&amp;amp;fn method=gauss qpoints=50; &lt;/P&gt;&lt;P&gt;&amp;nbsp; parms a0=1.6549&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; asex=-.7043&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; aasian=.5559&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ablack=-1.3403&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ahisp=-.7020&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; aamind=-1.0654&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; amulti=-.8059&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; aec=-.4590&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; alep=.2021&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; aoverage=-.4825&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; usiga=.7648&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; mu_a0=0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; b0=-6.8186&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; bsex=.9558&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; basian=-.5166&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; bblack=1.5365&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; bhisp=.7507&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; bamind=1.2369&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; bmulti=.9586&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; bec=.5113&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; blep=-.2454&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; boverage=.7596&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; mu_b0=0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; usigb=.6051&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; cov_uab=0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; k=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; zinb_p=min(max(1/(1 + exp(-(a0 + u0a))), 1E-200), 1-1E-200);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; eta_nb=b0 + bsex + basian + bblack + bhisp + bamind + bmulti + bec + blep + boverage + u0b + ln;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; etaxB=b0 + bsex + basian + bblack + bhisp + bamind + bmulti + bec + blep + boverage + ln;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; etaxBzG=b0 + bsex + basian + bblack + bhisp + bamind + bmulti + bec + blep + boverage + u0b + ln;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lambda = exp(eta_nb);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p0=zinb_p+(1-zinb_p)*exp(-(numdaysoss+(1/k))*log(1+k*lambda));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p_else=(1-zinb_p)*exp(lgamma(numdaysoss+(1/k)) - lgamma(numdaysoss+1) - lgamma(1/k) +numdaysoss*log(k*lambda) - (numdaysoss+(1/k))*log(1+k*lambda));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if numdaysoss=0 then loglike = log(p0);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else loglike = log(p_else);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; model numdaysoss ~ general(loglike);&lt;/P&gt;&lt;P&gt;&amp;nbsp; random u0a u0b ~ normal([mu_a0, mu_b0], [usiga, cov_uab, usigb]) subject=school_id out=rand_zinb (keep=school_id effect estimate);&lt;/P&gt;&lt;P&gt;&amp;nbsp; run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Dec 2013 20:44:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Slow-nlmixed-estimation/m-p/184083#M9559</guid>
      <dc:creator>jsberger</dc:creator>
      <dc:date>2013-12-30T20:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: Slow nlmixed estimation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Slow-nlmixed-estimation/m-p/184084#M9560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is one parameter I have a question about--ln, appearing in the three eta definitions.&amp;nbsp; It doesn't have a starting value in the parms statement, and so will start out equal to 1.&amp;nbsp; Is that a reasonable value?&amp;nbsp; What does it estimate?&amp;nbsp; Probably won't help the convergence problem much, but...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also what are all of the "a" parameters used for?&amp;nbsp; It appears that only a0 appears in any of the expressions (defining zinp_b).&amp;nbsp; You may need to include these in the zinp_b definition to match what your source data came up with.&amp;nbsp; Again, not real sure that it will help the convergence.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And while I don't have ANY experience with it, the OPTCHECK option on the NLMIXED statement might help move things along, but I am guessing about that, based solely on how it is described in the documentation.&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Dec 2013 13:28:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Slow-nlmixed-estimation/m-p/184084#M9560</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2013-12-31T13:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: Slow nlmixed estimation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Slow-nlmixed-estimation/m-p/184085#M9561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, the 'a' variables should all be included on the zinb_p definition.&amp;nbsp; These model the zero inflation portion.&amp;nbsp; The ln variable is the offset, or the log of the days enrolled in school (here in my example), as some subjects have differing number of days that they can be suspended.&amp;nbsp; I'll look into the optcheck feature.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Dec 2013 16:36:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Slow-nlmixed-estimation/m-p/184085#M9561</guid>
      <dc:creator>jsberger</dc:creator>
      <dc:date>2013-12-31T16:36:09Z</dc:date>
    </item>
    <item>
      <title>Re: Slow nlmixed estimation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Slow-nlmixed-estimation/m-p/184086#M9562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If it is an offset, ln(median days suspended) is a good initial value.&amp;nbsp; Just don't let it overload the exponentiation.&amp;nbsp; Since all of the other parameters sum to about -1, I don't think this is the problem.&amp;nbsp; I think the optimization is having a hard time with some schools having a much higher rate of zero inflation than others.&amp;nbsp; If this were a strictly fixed effects situation, I might suggest finite mixture models, mixing a negative binomial with a constant, as in a hurdle model.&amp;nbsp; But the standard errors won't work--everything will be dominated by the schools with a greater number of observations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Dec 2013 17:25:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Slow-nlmixed-estimation/m-p/184086#M9562</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2013-12-31T17:25:34Z</dc:date>
    </item>
  </channel>
</rss>

