Displaying 20 results from an estimated 9000 matches similar to: "Logistic Regression using glm"
2007 Mar 20
1
How does glm(family='binomial') deal with perfect sucess?
Hi all,
Trying to understand the logistic regression performed by glm (i.e. when
family='binomial'), and I'm curious to know how it treats perfect
success. That is, lets say I have the following summary data
x=c(1,2,3,4,5,6)
y=c(0,.04,.26,.76,.94,1)
w=c(100,100,100,100,100,100)
where x is y is the probability of success at each value of x,
calculated across w observations.
2009 Oct 23
3
opposite estimates from zeroinfl() and hurdle()
Dear all,
A question related to the following has been asked on R-help before, but
I could not find any answer to it. Input will be much appreciated.
I got an unexpected sign of the "slope" parameter associated with a
covariate (diam) using zeroinfl(). It led me to compare the estimates
given by zeroinfl() and hurdle():
The (significant) negative estimate here is surprising, given
2006 Aug 31
3
what's wrong with my simulation programs on logistic regression
Dear friends,
I'm doing a simulation on logistic regression model, but the programs can't
work well,please help me to correct it and give some suggestions.
My programs:
data<-matrix(rnorm(400),ncol=8) #sample size is 50
data<-data.frame(data)
names(data)<-c(paste("x",1:8,sep="")) #8 independent variables,x1-x8;
#logistic regression model is
2009 Nov 09
1
Percentage effects in logistic regression
Dear ALL,
I'm trying to figure out what the percentage effects are in a logistic
regression. To be more clear, I'm not interested in the effect on y of a
1-unit increase in x, but on the percentage effect on y of a 1% increase in
x (in economics this is also often called an "elasticity").
For example, if my independent variables are in logs, the betas can be
directly
2005 Jul 15
2
glm(family=binomial(link=logit))
Hi
I am trying to make glm() work to analyze a toy logit system.
I have a dataframe with x and y independent variables. I have
L=1+x-y (ie coefficients 1,1,-1)
then if I have a logit relation with L=log(p/(1-p)),
p=1/(1+exp(L)).
If I interpret "p" as the probability of success in a Bernouilli
trial, and I can observe the result (0 for "no", 1 for
2005 Nov 22
1
what does the it when there is a zero events in the Logistic Regression with glm?
Dear all,
I have a question about the glm. When the events of an observation is 0,
the logit function on it is Inf. I wonder how the glm solve it.
An example:
Treat Events Trials
A 0 50
B 7 50
C 10 50
D 15 50
E 17 50
Program:
treat <- factor(c("A", "B", "C", "D", "E"))
events <- c(0, 7, 10, 15,
2010 Jul 09
1
Appropriate tests for logistic regression with a continuous predictor variable and Bernoulli response variable
I have a data with binary response variable, repcnd (pregnant or not) and one predictor continuous variable, svl (body size) as shown below. I did Hosmer-Lemeshow test as a goodness of fit (as suggested by a kind “R-helper” previously). To test whether the predictor (svl, or body size) has significant effect on predicting whether or not a female snake is pregnant, I used the differences between
2009 Jul 14
2
SOS! error in GLM logistic regression...
Hi all,
Could anybody tell me what happened to my logistic regression in R?
mylog=glm(mytraindata$V1 ~ ., data=mytraindata, family=binomial("logit"))
It generated the following error message:
Error in model.frame.default(Terms, newdata, na.action = na.action,
xlev = object$xlevels) :
factor 'state1' has new level(s) AP
Thank you!
2012 Dec 11
1
glm - predict logistic regression - entering the betas manually.
Dear All,
I know this may be a trivial question.
In the past I have used glm to make logistic regressions on data. The output creates an object with the results of the logistic regression. This object can then be used to make predictions.
Great.
I have a different problem. I need to make predictions from a logistic regression taken from a paper. Thus I need to (by hand) enter the reported odds
2002 Aug 04
5
Pseudo R^2 for logit - really naive question
I am using GLM to calculate logit models based on cross-sectional data. I
am now down to the hard work of making the results intelligible to very
average readers. Is there any way to calculate a psuedo analoque to the R^2
in standard linear regression for use as a purely descriptive statistic of
goodness of fit? Most of the readers of my report will be vaguely familiar
and more comfortable with
2004 Mar 01
1
glm logistic model, prediction intervals on impact af age 60 compared to age 30
Dear R-list.
I have done a logistic glm using Age as explanatory variable for some
allergic event.
#the model
model2d<-glm(formula=AEorSAEInfecBac~Age,family=binomial("logit"),data=emrisk)
#predictions for age 30 and 60
preds<-predict(model2d,data.frame(Age=c(30,60)),se.fit=TRUE)
# prediction interval
2001 Dec 14
1
Logistic regression : dicrepancies between glm and nls ?
Dear list,
I'm trying to learn how to use nlme to be able to fit ad analyse
mixed-model logistic regressions. In order to keep things simple, I
started by the simplest possible model : a one (fixed-effect ...)
continuous variable. This problem is, of course, solved by glm, but I
wanted to look at a "hand-made" nls fit, in order to be able to
"generalize" to nlme
2008 Nov 08
3
Fitting a modified logistic with glm?
Hi all,
Where f(x) is a logistic function, I have data that follow:
g(x) = f(x)*.5 + .5
How would you suggest I modify the standard glm(..., family='binomial')
function to fit this? Here's an example of a clearly ill-advised attempt to
simply use the standard glm(..., family='binomial') approach:
########
# First generate some data
########
#define the scale and location of
2008 Apr 03
1
help with R semantics
Greetings:
I'm running R2.6.2 on a WinXP DELL box with 2 gig RAM.
I have created a new glm link function to be used with family = binomial.
The function works (although any suggested improvements would be welcome),
logit.FC <- function(POD.floor = 0, POD.ceiling =1)
{ if (POD.floor < 0 | POD.floor > 1) stop ("POD.floor must be between zero
and one.")
if
2012 May 25
1
Breakpoint in logistic GLM with 'segmented' package - error: replacement length zero
Hello all,
I've been having trouble with assessing a breakpoint in a logistic GLM
with two explanatory variables. For this analysis I've been using the
'segmented' package version 0.2-9.1. But I keep getting an error and I
don't see where I would be going awry. The situation is the following:
Two explanatory variables:
bedekking - a variable with possible values between 0 and
2010 Jul 03
2
logistic regression - glm() - example in Dalgaard's book ISwR
Dear R-list members,
I would like to pose a question about the use and results
of the glm() function for logistic regression calculations.
The question is based on an example provided on p. 229
in P. Dalgaard, Introductory Statistics with R, 2nd. edition,
Springer, 2008. By means of this example, I was trying to
practice the different ways of entering data in glm().
In his book, Dalgaard
2011 Dec 01
1
logistic regression - glm.fit: fitted probabilities numerically 0 or 1 occurred
Sorry if this is a duplicate: This is a re-post because the pdf's mentioned
below did not go through.
Hello,
I'm new'ish to R, and very new to glm. I've read a lot about my issue:
Warning message:
glm.fit: fitted probabilities numerically 0 or 1 occurred
...including:
http://tolstoy.newcastle.edu.au/R/help/05/07/7759.html
2008 Nov 20
1
syntax and package for generalized linear mixed models
Hi All,
I am making the switch to R and uncertain which of the several packages for
mixed models is appropriate for my analysis. I am waiting for Pinheiro and
Bates' book to arrive via inter-library loan, but it will be a week or more
before it arrives.
I am trying to fit a generalized linear mixed model of survival data
(successes/trials) as a function of several categorical fixed and
2003 Jun 19
2
Grouping binary data
Dear all,
I'm analyzing a binary outcome using glm() with a binomial distribution and
a logit link, and have now reached the point where I'd like to do some
model checking. Since my data are in binary form I'd like to collapse over
the cross-classification of the factors before the model checking.
Are there any nice and simple ways doing this? If so, how? If not, I'd be
2005 Dec 14
3
glmmADMB: Generalized Linear Mixed Models using AD Model Builder
Dear R-users,
Half a year ago we put out the R package "glmmADMB" for fitting
overdispersed count data.
http://otter-rsch.com/admbre/examples/glmmadmb/glmmADMB.html
Several people who used this package have requested
additional features. We now have a new version ready.
The major new feature is that glmmADMB allows Bernoulli responses
with logistic and probit links. In addition there