similar to: what does the it when there is a zero events in the Logistic Regression with glm?

Displaying 20 results from an estimated 10000 matches similar to: "what does the it when there is a zero events in the Logistic Regression with glm?"

2005 Oct 11
2
Logistic Regression using glm
Hello everyone, I am currently teaching an intermediate stats. course at UCSD Extension using R. We are using Venables and Ripley as the primary text for the course, with Freund & Wilson's Statistical Methods as a secondary reference. I recently gave a homework assignment on logistic regression, and I had a question about glm. Let n be the number of trials, p be the estimated
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
2010 Dec 11
2
Specifying Prior Weights in a GLM
Hello R folks, I have three questions. I am trying to run a logistic regression (binomial family) where the response variable is a proportion. According to R Documentation in "a binomial GLM prior weights are used to give the number of trials when the response is the proportion of successes." However when I run my code I get the following error message: Error in
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
2012 Oct 17
4
function logit() vs logistic regression
Hello! When I am analyzing proportion data, I usually apply logistic regression using a glm model with binomial family. For example: m <- glm( cbind("not realized", "realized") ~ v1 + v2 , family="binomial") However, sometimes I don't have the number of cases (realized, not realized), but only the proportion and thus cannot compute the binomial model. I just
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!
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
2009 Mar 24
2
modelling probabilities instead of binary data with logistic regression
Dear all, I have a dataset where I reduced the dimensionality, and now I have a response variable with probabilities/proportions between 0 and 1. I wanted to do a logistic regression on those, but the function glm refuses to do that with non-integer values in the response. I also tried lrm, but that one interpretes the probabilities as different levels and gives for every level a different
2010 Apr 16
2
Weights in binomial glm
I have some questions about the use of weights in binomial glm as I am not getting the results I would expect. In my case the weights I have can be seen as 'replicate weights'; one respondent i in my dataset corresponds to w[i] persons in the population. From the documentation of the glm method, I understand that the weights can indeed be used for this: "For a binomial GLM prior
2008 Sep 23
3
odds ratio: how to create reference
HI there, i know this is a basic question, though i need some help because this is somewhat away from my current issue, but nevertheless interesting to me... Lets assume i have some estimated probabilities, say estimated by a logit model. i know i can also state them as an odds ratio. Now i?d like to state these odds ratios as a reference to a specific outcome of my investigated
2009 Aug 01
4
Likelihood Function for Multinomial Logistic Regression and its partial derivatives
Hi, I would like to apply the L-BFGS optimization algorithm to compute the MLE of a multilevel multinomial Logistic Regression. The likelihood formula for this model has as one of the summands the formula for computing the likelihood of an ordinary (single-level) multinomial logit regression. So I would basically need the R implementation for this formula. The L-BFGS algorithm also requires
2007 Nov 15
3
not R question : alternative to logistic regression
I was just curious if anyone knew of an alternative model to logistic regression where the probabilities seems pretty linear to the predictor rather than having that S shape that probit and logit assume. Maybe there is there some kind of other GLM that could accomplish that. Any textbook references or suggestions are appreciated. I have most of the texts but if someone knows of a text that talks
2011 May 08
1
Hosmer-Lemeshow 'goodness of fit'
I'm trying to do a Hosmer-Lemeshow 'goodness of fit' test on my logistic regression model. I found some code here: http://sas-and-r.blogspot.com/2010/09/example-87-hosmer-and-lemeshow-goodness.html The R code is above is a little complicated for me but I'm having trouble with my answer: Hosmer-Lemeshow: p=0.6163585 le Cessie and Houwelingen test (Design library): p=0.2843620
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
2007 Feb 02
1
multinomial logistic regression with equality constraints?
I'm interested in doing multinomial logistic regression with equality constraints on some of the parameter values. For example, with categorical outcomes Y_1 (baseline), Y_2, and Y_3, and covariates X_1 and X_2, I might want to impose the equality constraint that \beta_{2,1} = \beta_{3,2} that is, that the effect of X_1 on the logit of Y_2 is the same as the effect of X_2 on the
2007 Jun 28
2
logistic regression and dummy variable coding
Hello everyone, I have a variable with several categories and I want to convert this into dummy variables and do logistic regression on it. I used model.matrix to create dummy variables but it always picked the smallest one as the reference. For example, model.matrix(~.,data=as.data.frame(letters[1:5])) will code 'a' as '0 0 0 0'. But I want to code another category as
2007 May 31
1
Conditional logistic regression for "events/trials" format
Dear R users, I have a large individual-level dataset (~700,000 records) which I am performing a conditional logistic regression on. Key variables include the dichotomous outcome, dichotomous exposure, and the stratum to which each person belongs. Using this individual-level dataset I can successfully use clogit to create the model I want. However reading this large .csv file into R and running
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
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
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