similar to: variable types - logistic regression

Displaying 20 results from an estimated 9000 matches similar to: "variable types - logistic regression"

2012 Oct 23
3
Error in contrasts message when using logistic regression code.
I have a rather large data set (about 30 predictor variables) I need to preform a logistic regression on this data. My response variable is binary. My code looks like this: mylogit <- glm(Enrolled ~ A + B + C + ... + EE, data = data, family = binomial(link="logit")) with A,B,C, ... as my predictor variables. Some categorical, some continuous, some binary. I run the code and get
2009 Nov 16
2
fitting a logistic regression with mixed type of variables
Hi, I am trying to fit a logistic regression using glm, but my explanatory variables are of mixed type: some are numeric, some are ordinal, some are categorical, say If x1 is numeric, x2 is ordinal, x3 is categorical, is the following formula OK? *model <- glm(y~x1+x2+x3, family=binomial(link="logit"), na.action=na.pass)* * * *Thanks,* * * *-Jack* [[alternative HTML version
2010 Jun 06
2
fitting multinomial logistic regression
Sir, I want to fit a multinomial logistic regression in R.I think mlogit() is the function for doing this. mlogit () is in packege globaltest.But, I can not install this package. I use the following: install.packages("globaltest") Can you help me? Regards, Suman Dhara [[alternative HTML version deleted]]
2006 May 24
2
Logistic Regression - Results?
Hi, I use SPSS at work and have R installed both at work and on my home machine. I've been trying to do some logistic regressions in R and SPSS, but the results I'm getting are different. I've followed a few R tutorials, and with most of them, I get the following instructions: result <- glm(z ~ x + y, family=binomial(logit)) In the case above, with three variables (z being
2010 Mar 31
2
interpretation of p values for highly correlated logistic analysis
Dear list, I want to perform a logistic regression analysis with multiple categorical predictors (i.e., a logit) on some data where there is a very definite relationship between one predicator and the response/independent variable. The problem I have is that in such a case the p value goes very high (while I as a naive newbie would expect it to crash towards 0). I'll illustrate my problem
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
2010 Mar 28
6
Coding of categorical variables for logistic regression?
Hello, I am trying to do a logistic regression and have one predictor variable (x) that is ratio and two predictor variables (y and z) that are categorical. These have three levels each which I have called "High", "Medium" and "Low". My question: do I need to use a numerical coding scheme for the categorical variables as required by some statistical software
2009 Nov 14
1
setting contrasts for a logistic regression
Hi everyone, I'm doing a logistic regression with an ordinal variable. I'd like to set the contrasts on the ordinal variable. However, when I set the contrasts, they work for ordinary linear regression (lm), but not logistic regression (lrm): ddist = datadist(bin.time, exp.loc) options(datadist='ddist') contrasts(exp.loc) = contr.treatment(3, base = 3, contrasts = TRUE) lrm.loc =
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
2003 Aug 19
3
logistic regression without intercept
I want to do a logistic regression without an intercept term. This option is absent from glm, though present in some of the inner functions glm uses. I gather glm is the standard way to do logistic regression in R. Hoping it would be passed in, I said > r <- glm(brain.cancer~epilepsy+other.cancer, c3, > family=binomial(link="logit"), intercept=FALSE) which produced
2009 Oct 08
1
unordered multinomial logistic regression (or logit model) with repeated measures (I think)
I am attempted to examine the temporal independence of my data set and think I need an unordered multinomial logistic regression (or logit model) with repeated measures to do so. The data in question is location of chickens. Chickens could be in any one of 5 locations when a snapshot sample was taken. The locations of chickens (bird) in 8 pens (pen) were scored twice a day (AMPM) for 20 days
2005 Feb 07
3
problem with logistic regression
Hi, we try to do a logistic regression with the function glm. But we notice that this function don't give the same results as the SAS proc catmod (differents estimate given). We try to change the contrast on R system with: > options(contrasts=c(unordered="contr.SAS",ordered="contr.poly")) We also try with brlr and logistf functions. Unfortunately, the estimate
2009 Jul 17
2
Getting the C-index for a dataset that was not used to generate the logistic model
Does anyone know how to get the C-index from a logistic model - not using the dataset that was used to train the model, but instead using a fresh dataset on the same model? I have a dataset of 400 points that I've split into two halves, one for training the logistic model, and the other for evaluating it. The structure is as follows: column headers are "got a loan" (dichotomous),
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 Aug 25
1
Syntax for a three-level logistic model
Dear People at R help, I am trying to figure out the syntax for a three-level logistic model with a single random effect (intercept): Data Collected My data consist of three levels: level 1 is four setting for each student (setting nested within student), and each student is registered in one of 14 universities (students nested within university). More detailed: A. 2,479 students who have a
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 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 Nov 11
2
Consistency of Logistic Regression
Dear R developers, I have noticed a discrepancy between the coefficients returned by R's glm() for logistic regression and SAS's PROC LOGISTIC. I am using dist = binomial and link = logit for both R and SAS. I believe R uses IRLS whereas SAS uses Fisher's scoring, but the difference is something like 100 SE on the intercept. What accounts for such a huge difference? Thank you for
2004 Aug 02
3
logistic regression
I have a system with a binary response variable that was hypothesized to follow a simple logistic function. The relationship between the continuous independent variable and the logit is clearly not monotonic. I have two questions. 1) Can anyone recommend a reference that describes my modeling options in this case, and 2) what facilities does R have to deal with this situation? Thanks, Kevin
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!