[R] need help with understanding stepAIC

ONKELINX, Thierry Thierry.ONKELINX at inbo.be
Thu Apr 3 10:15:20 CEST 2008

```Dear Balavelan,

First I would suggest to include the main effects of all variables in an
interaction. So you model with interaction should be y ~ a + b + c + d +
c:d. Which can be abbreviated to y ~ a + b + c*d.

Futhermore you should take a look at ?predict.glm and pay attention to
the newdata and type = "reponse" arguments.

HTH,

Thierry

------------------------------------------------------------------------
----
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and Forest
Cel biometrie, methodologie en kwaliteitszorg / Section biometrics,
methodology and quality assurance
Gaverstraat 4
9500 Geraardsbergen
Belgium
tel. + 32 54/436 185
Thierry.Onkelinx op inbo.be
www.inbo.be

To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to
say what the experiment died of.
~ Sir Ronald Aylmer Fisher

The plural of anecdote is not data.
~ Roger Brinner

The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of
data.
~ John Tukey

-----Oorspronkelijk bericht-----
Van: r-help-bounces op r-project.org [mailto:r-help-bounces op r-project.org]
Namens Bala Thanigaivelan
Verzonden: donderdag 3 april 2008 4:22
Aan: r-help op r-project.org
Onderwerp: [R] need help with understanding stepAIC

Hi,

I am currently using R extensively to develop a statistical model and
currently learning its capabilities.

I am trying to develop a logistic regression model using glm and stepAIC

I constructed my formula as y ~ a + b + c + d

Now I wish to study the interaction between variables. So I did y ~ a +
b + c:d + d

The software generated the coefficients for a, b , c:d, d

Now I want to compute the probability for various events using the
logistic regression model formula

Prob = exp(y)/(1+exp(y))

How do I compute the value of y for the formula with interaction
variables ? what does c:d represent given a dataset ?

Regards,

Balavelan

[[alternative HTML version deleted]]

______________________________________________
R-help op r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help