Posts Tagged ‘ glm ’

Confidence interval for predictions with GLMs

November 4, 2011
By
Confidence interval for predictions with GLMs

Consider a (simple) Poisson regression . Given a sample where , the goal is to derive a 95% confidence interval for given , where is the prediction. Hence, we want to derive a confidence interval for the prediction, not the potential observation...

Read more »

Test Difference between Two Proportions & Plot Confidence Intervals

August 11, 2011
By
Test Difference between Two Proportions & Plot Confidence Intervals

..an illustrative example for testing proportions and presenting the results.the data: number of indigenous and alien plant species with and without vegetative reproduction. Hypothesis: The proportion of species with vegetative reproduction is differen...

Read more »

Model Validation: Interpreting Residual Plots

July 18, 2011
By
Model Validation: Interpreting Residual Plots

When conducting any statistical analysis it is important to evaluate how well the model fits the data and that the data meet the assumptions of the model. There are numerous ways to do this and a variety of statistical tests to evaluate deviations from model assumptions. However, there is little general acceptance of any...

Read more »

Generalized Linear Models – Poisson Regression

June 26, 2011
By
Generalized Linear Models – Poisson Regression

The Generalized Linear Model (GLM) allows us to model responses with distributions other than the Normal distribution, which is one of the assumptions underlying linear regression as used in many cases. When data is counts of events (or items) then a discrete distribution is more appropriate is usually more appropriate than approximating with a...

Read more »

My residuals look weird… aren’t they ?

November 3, 2010
By
My residuals look weird… aren’t they ?

Since I got the same question twice, let us look at it quickly....  Some students show me a graph (from a Poisson regression) which looks like that, and they asked "isn't it weird ?", i.e."residuals are null or positive... this is not what we...

Read more »

Studying joint effects in a regression

October 7, 2010
By
Studying joint effects in a regression

We've seen in the previous post (here)  how important the *-cartesian product to model joint effected in the regression. Consider the case of two explanatory variates, one continuous (, the age of the driver) and one qualitative (, gasoline ve...

Read more »

Bookshelf remodelling

August 18, 2010
By
Bookshelf remodelling

I found time and read Gelman and Hill’s “Data Analysis Using Regression and Multilevel / Hierarchical Models“…Now, please do yourself a favour and get it (of course the paperback version ). Even for experienced or intermediate (myself) this will be a treat for your eyes and neurons. PS : (Confession) I didn’t like the...

Read more »

R Commander – logistic regression

June 23, 2010
By
R Commander – logistic regression

We can use the R Commander GUI to fit logistic regression models with one or more explanatory variables. There are also facilities to plot data and consider model diagnostics. The same series of menus as for linear models are used to fit a logistic regression model. Fast Tube by Casper The “Statistics” menu provides access to...

Read more »

Measuring the length of time to run a function

March 16, 2010
By

When writing R code it is useful to be able to assess the amount of time that a particular function takes to run. We might be interested in measuring the increase in time required by our function as the size of the data increases. To illustrate using the system.time function to calculate the time taken...

Read more »

Offset in glm ()

August 17, 2007
By
Offset in glm ()

To add an offset to the linear predictor of a generalized linear model (or models from the survival package such as coxph and clogit), use offset(x) in the formula. This will add an offset to the linear predictor with known coefficient 1.

Read more »

Sponsors