[R] GLM fitting in R and Statistica

From: Agnieszka Kloch <a.kloch_at_uj.edu.pl>
Date: Wed, 09 Apr 2008 20:08:55 +0200

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 either.

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

R-help_at_r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Wed 09 Apr 2008 - 18:25:01 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 09 Apr 2008 - 21:30:29 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive