<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/173534</link>
    <title>MATLAB Central Newsreader - glmfit 'offset' parameter</title>
    <description>Feed for thread: glmfit 'offset' parameter</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Wed, 30 Jul 2008 22:23:02 -0400</pubDate>
      <title>glmfit 'offset' parameter</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/173534#446426</link>
      <author>Joe Ercolino</author>
      <description>Hi&lt;br&gt;
&lt;br&gt;
I don't get the purpose/usage of the 'offset' parameter in&lt;br&gt;
the glmfit function doc. I browsed through the references&lt;br&gt;
(Dobson and McCullagh), but didn't find a similar parameter.&lt;br&gt;
Does anyone know its meaning?&lt;br&gt;
&lt;br&gt;
Thanks</description>
    </item>
    <item>
      <pubDate>Thu, 31 Jul 2008 01:43:44 -0400</pubDate>
      <title>Re: glmfit 'offset' parameter</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/173534#446459</link>
      <author>Tom Lane</author>
      <description>&amp;gt; I don't get the purpose/usage of the 'offset' parameter in&lt;br&gt;
&amp;gt; the glmfit function doc.&lt;br&gt;
&lt;br&gt;
Joe, in regular regression suppose you want to fit a model like this:&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;y = a + x1 + b*x2 + error&lt;br&gt;
&lt;br&gt;
In other words, you know the coefficient of x1 (we can assume it is 1 here). &lt;br&gt;
It's easy enough to fit this by least squares by re-writing&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;y - x1 = a + b*x + error&lt;br&gt;
&lt;br&gt;
For generalized linear models, the response isn't a simple sum of a linear &lt;br&gt;
function of the predictors with additive errors, so it's not possible to &lt;br&gt;
re-write in the same way.&lt;br&gt;
&lt;br&gt;
Here's a semi-realistic example where this would be useful.  Suppose the &lt;br&gt;
number of defects on a surface should be proportional to the surface area, &lt;br&gt;
or the number of events in an interval of time should be proportional to the &lt;br&gt;
length of time.  The count of defects or events might reasonably be modeled &lt;br&gt;
by a Poisson distribution.  If we subtracted or divided off the area or &lt;br&gt;
time, we'd get something that might not even be integer valued.  Instead, if &lt;br&gt;
we model the expected value as&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;E[y] = area * exp(a + b*x)&lt;br&gt;
&lt;br&gt;
we can take logs to get&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;log(E[y]) = log(area) + a + b*x&lt;br&gt;
&lt;br&gt;
The offset parameter allows us to handle the term that doesn't have a &lt;br&gt;
coefficient to be estimated.&lt;br&gt;
&lt;br&gt;
-- Tom </description>
    </item>
    <item>
      <pubDate>Thu, 31 Jul 2008 11:09:35 -0400</pubDate>
      <title>Re: glmfit 'offset' parameter</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/173534#446533</link>
      <author>Peter Perkins</author>
      <description>Joe Ercolino wrote:&lt;br&gt;
&amp;gt; Hi&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I don't get the purpose/usage of the 'offset' parameter in&lt;br&gt;
&amp;gt; the glmfit function doc. I browsed through the references&lt;br&gt;
&amp;gt; (Dobson and McCullagh), but didn't find a similar parameter.&lt;br&gt;
&amp;gt; Does anyone know its meaning?&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
McCullagh&amp;Nelder's book has an example of this in the Poisson chapter, &lt;br&gt;
in the ship damage example:  length of service.</description>
    </item>
    <item>
      <pubDate>Thu, 31 Jul 2008 16:06:02 -0400</pubDate>
      <title>Re: glmfit 'offset' parameter</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/173534#446577</link>
      <author>Joe Ercolino</author>
      <description>Thanks, both replies have been very helpful.&lt;br&gt;
&lt;br&gt;
My problem at hand deals with the dose-response of a&lt;br&gt;
population of animals to a toxic agent using the&lt;br&gt;
binomial-probit model. Now I realize that I could use the&lt;br&gt;
average weight of each dose-group of animals to normalize&lt;br&gt;
the dose or use it as an offset. What would be the&lt;br&gt;
difference in these approaches?&lt;br&gt;
&lt;br&gt;
Thanks in advance.</description>
    </item>
    <item>
      <pubDate>Thu, 31 Jul 2008 19:06:17 -0400</pubDate>
      <title>Re: glmfit 'offset' parameter</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/173534#446611</link>
      <author>Peter Perkins</author>
      <description>Joe Ercolino wrote:&lt;br&gt;
&amp;gt; Thanks, both replies have been very helpful.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; My problem at hand deals with the dose-response of a&lt;br&gt;
&amp;gt; population of animals to a toxic agent using the&lt;br&gt;
&amp;gt; binomial-probit model. Now I realize that I could use the&lt;br&gt;
&amp;gt; average weight of each dose-group of animals to normalize&lt;br&gt;
&amp;gt; the dose or use it as an offset. What would be the&lt;br&gt;
&amp;gt; difference in these approaches?&lt;br&gt;
&lt;br&gt;
I can't tell you what your model should be.  But think of the offset as being a predictor variable for which the coefficient in the linear predictor is held fixed at 1.  With a log link (as in a Poisson regression), it's easy to see the effect: it's a multiplicative constant on the predicted mean.  M&amp;N's example is to use log(exposure), I think, and the link then exponentiates that back to exposure.  With a probit model, the effect is a little less obvious to me.</description>
    </item>
  </channel>
</rss>

