[R] glm.fit: fitted probabilities numerically 0 or 1 occurred for a continuous variable?

2014-06-16 Thread Nwinters
I have gotten the this error before: "glm.fit: fitted probabilities
numerically 0 or 1 occurred"

and the problem was usually solved by combining one or more categories were
there were no observations.

I am now having this error show up for a variable that is continuous (not
categorical).

What could be the cause of this for a continuous variable??

Thanks, 
Nick



--
View this message in context: 
http://r.789695.n4.nabble.com/glm-fit-fitted-probabilities-numerically-0-or-1-occurred-for-a-continuous-variable-tp4692211.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Package 'effects' plotting allEffects question

2014-06-06 Thread Nwinters
Is there a way to plot just the response function for one variable, instead
of every variable on the same plot?

my model has 13 variables and the plot produces a graph for each of these on
the same plot, which is useless.



--
View this message in context: 
http://r.789695.n4.nabble.com/Package-effects-plotting-allEffects-question-tp4691818.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Help with factor levels and reference level

2014-06-06 Thread Nwinters
I have a variable coded in Stata as follows:
**
*gen sat_pm25cat_=.
replace sat_pm25cat_= 1 if (sat_pm25>=4 & sat_pm25<=7.1 & sat_pm25!=.)
replace sat_pm25cat_= 2 if (sat_pm25>=7.1 & sat_pm25<=10)
replace sat_pm25cat_= 3 if (sat_pm25>=10.1 & sat_pm25<=11.3)
replace sat_pm25cat_= 4 if (sat_pm25>=11.4 & sat_pm25<=12.1)
replace sat_pm25cat_= 5 if (sat_pm25>=12.2 & sat_pm25<=17.1)

gen satpm25catR= "A" if sat_pm25cat_==1
replace satpm25catR= "B" if sat_pm25cat_==2
replace satpm25catR= "C" if sat_pm25cat_==3
replace satpm25catR= "D" if sat_pm25cat_==4
replace satpm25catR= "E" if sat_pm25cat_==5
***

my model for R is:
##
*glm.PM25linB <-glm(leuk ~ satpm25catR + sex + ageR, data=leuk,
family=binomial, epsilon=1e-15, maxit=1000)*
##

In the summary, satpm25catR is being reported as all levels:

 

*What I want is to make "A" the reference level, how do I do this??*
Thank you



--
View this message in context: 
http://r.789695.n4.nabble.com/Help-with-factor-levels-and-reference-level-tp4691823.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Package 'effects' plotting allEffects question

2014-06-06 Thread Nwinters
Is there a way to plot just the response function for one variable, instead
of every variable on the same plot?

my model has 13 variables and the plot produces a graph for each of these on
the same plot, which is useless.



--
View this message in context: 
http://r.789695.n4.nabble.com/Package-effects-plotting-allEffects-question-tp4691817.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.