[R] GLM fitting in R and Statistica

Agnieszka Kloch a.kloch at uj.edu.pl
Wed Apr 9 20:08:55 CEST 2008

I have a problem concerning discrepances between R (which I use) and 
Statistica (which uses my supervisor). I can't say what is the origin 
of these differences but unfortunately my supervisor doesn't know that 

Our response variable is number (or presence/absence) of parasites in 
rodents and explanatory variables are presence/absence of several 
alleles. The rodents were sampled in three sites and the sites differ 
in parasite frequency so we decided to include "site" as a factor.

The problem concerns calculations of factor variable. In Statistica 
output there is only one term, just "site", and in R there are two 
contrats "site A", "site B". I realized that I can obtain similar 
results in Statistica clicking on "Estimate" button instead of "1LR" 
(what does my supervisor which gives only log-likelihood and p of 
variables but doesn't estimate parameter).

But there is still one problem I can't explain. When we fit 
interaction terms (site x allele1, site x allele2 and so on) the 
results are completely different. I tried several different contrasts 
in R, such as contr.SAS, contr.treatment etc but I couldn't get 
nothing similar to Statistica output.

Have anybody any idea how to deal with that? Or how to explain why R 
results are different (and hopefully better)? I tried to argue that I 
did everything according to Crawley's R Book so probably the models 
are constructed correctly but my supervisor wasn't convinced...

Looking forward any suggestions,


Agnieszka Kloch
Instytute of Environmental Sciences, Jagielonian University
ul. Gronostajowa 7, 30-387 Krakow, Poland, tel. (12) 664 51 51

More information about the R-help mailing list