Group Abstract Group Abstract

Message Boards Message Boards

Get prediction intervals of parameters on GLM Binomial models?

Posted 8 years ago

Using Binomial data we need to determine predicational intervals on x at specific probabilities (Y). Enclosed is code that produces a visual representation of example fitted data but not the + and - 95% prediction values of x. The image of the plot (copy included) indicates the two points we need to determine.

Attachment

Attachments:
POSTED BY: Terry Acree
5 Replies
Posted 8 years ago

I think what you want are confidence intervals for $x$ given some probability $p$ (not prediction or predictional intervals - and I don't know what predictional intervals are).

Because the model you're fitting is

$$\log \left(\frac{\text{prob}}{1-\text{prob}}\right)=a+b x$$

you want confidence intervals for $x$

$$x = \frac{\log \left(\frac{\text{prob}}{1-\text{prob}}\right)-a}{b}$$

You can get the lower and upper limits for a 95% confidence interval for $x$ with the following:

prob = 0.5;
upper= tt /. Solve[prob == 1 - 1/(1 + Exp[parms.{1, tt} - 1.96 Sqrt[{1, tt}.cov.{1, tt}]]), tt]
lower= tt /. Solve[prob == 1 - 1/(1 + Exp[parms.{1, tt} + 1.96 Sqrt[{1, tt}.cov.{1, tt}]]), tt]
POSTED BY: Jim Baldwin

hello Bill

You hit the nail on the head I am having problems with language, as my parameter-variable faux-pax made clear. I have included a copy of the data I used to generate the plot. A glance will make it clear that it is a Binomial (n=12) data set and not Bernoulli. The column on the left is the predictor variable tested 12 times for each value of x and the column on the right is the response variable y. Or am I mistaken. { {2.69897, 1.}, {2.69897, 1.}, {2.69897, 1.}, {2.69897, 1.}, {2.69897, 1.}, {2.69897, 1.}, {2.69897, 1.}, {2.69897, 1.}, {2.69897, 1.}, {2.69897, 1.}, {2.69897, 1.}, {2.69897, 1.}, {2., 1.}, {2., 1.}, {2., 1.}, {2., 1.}, {2., 1.}, {2., 1.}, {2., 1.}, {2., 1.}, {2., 1.}, {2., 1.}, {2., 1.}, {2., 1.}, {1.69897, 1.}, {1.69897, 1.}, {1.69897, 1.}, {1.69897, 1.}, {1.69897, 1.}, {1.69897, 1.}, {1.69897, 1.}, {1.69897, 1.}, {1.69897, 1.}, {1.69897, 1.}, {1.69897, 1.}, {1.69897, 1.}, {1., 1.}, {1., 1.}, {1., 1.}, {1., 1.}, {1., 1.}, {1., 1.}, {1., 1.}, {1., 1.}, {1., 1.}, {1., 1.}, {1., 1.}, {1., 1.}, {0.69897, 1.}, {0.69897, 1.}, {0.69897, 1.}, {0.69897, 1.}, {0.69897, 1.}, {0.69897, 1.}, {0.69897, 1.}, {0.69897, 1.}, {0.69897, 1.}, {0.69897, 1.}, {0.69897, 1.}, {0.69897, 1.}, {0., 0.}, {0., 0.}, {0., 0.}, {0., 0.}, {0., 0.}, {0., 0.}, {0., 0.}, {0., 1.}, {0., 1.}, {0., 1.}, {0., 1.}, {0., 1.}, {-0.30103, 0.}, {-0.30103, 0.}, {-0.30103, 0.}, {-0.30103, 0.}, {-0.30103, 1.}, {-0.30103, 1.}, {-0.30103, 1.}, {-0.30103, 1.}, {-0.30103, 1.}, {-0.30103, 1.}, {-0.30103, 1.}, {-0.30103, 1.}, {-1., 0.}, {-1., 0.}, {-1., 0.}, {-1., 0.}, {-1., 0.}, {-1., 0.}, {-1., 0.}, {-1., 0.}, {-1., 0.}, {-1., 0.}, {-1., 0.}, {-1., 0.}, {-1.30103, 0.}, {-1.30103, 0.}, {-1.30103, 0.}, {-1.30103, 0.}, {-1.30103, 0.}, {-1.30103, 0.}, {-1.30103, 0.}, {-1.30103, 0.}, {-1.30103, 0.}, {-1.30103, 0.}, {-1.30103, 0.}, {-1.30103, 1.} }

POSTED BY: Terry Acree
Posted 8 years ago
POSTED BY: Jim Baldwin
POSTED BY: Terry Acree
Attachment

Attachments:
POSTED BY: Terry Acree
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard