[R] Variable selection with quadratic terms

2010-04-13 Thread Sophie Baillargeon
Hi, I am trying to do stepwise variable selection with the function step. I want to allow in the model all main effects, double interactions and quadratic terms. However, I would like to respect the hierarchy of the terms, i.e. a quadratic term can be added to the model only if the main effect

[R] glm convergence warning

2012-05-17 Thread Sophie Baillargeon
Hi, When I run the following code : Y <- c(rep(0,35),1,2,0,6,8,16,43) cst <- log(choose(42, 42:1)) beta <- 42:1 tau <- (beta^2)/2 fit <- glm(formula = Y ~ offset(cst) + beta + tau, family = poisson) fit fit$converged glm prints a warning saying that the algorithm did not converge. However, fit$