Displaying 20 results from an estimated 10000 matches similar to: "Model Fit Statistics in a Logit Model"
2010 Mar 29
1
Question about 'logit' and 'mlogit' in Zelig
I'm running a multinomial logit in R using the Zelig packages. According to str(trade962a), my dependent variable is a factor with three levels. When I run the multinomial logit I get an error message. However, when I run 'model=logit' it works fine. any ideas on whats wrong?
## MULTINOMIAL LOGIT
anes96two <- zelig(trade962a ~ age962 + education962 + personal962 + economy962 +
2011 Dec 22
1
Error message with glm
I'm working on a logistic regression in R with the car package but keep
getting the following error message.
It's only and warning and not an error, but I'm just not sure how to
resolve the issues.
glm.fit: algorithm did not converge
glm.fit: fitted probabilities numerically 0 or 1 occurred
d1 = data.frame(mwin=c(mwin), mbid=c(mbid))
m1 = zelig(mwin ~ mbid, data=d1,
2013 Feb 21
0
Odd Error message with rare events logit
I'm running a rare events logit model in R using the Zelig package and am
getting some of the oddest error messages that I can't figure out.
y = rnorm(100)
x = c(rep("0",1), rep("1",99))
d = data.frame(won=x, bid=y)
d
mod1 <- zelig(y~x, model="relogit", data=d, tau=1/100,
case.correct="prior", bias.correct=TRUE, robust=TRUE)
> mod1 <-
2011 Dec 16
0
Error constructing probabilities in Zelig
I've run an ordered logistic regression model in R with Zelig and am
looking to calculate predicted probabilities. Zelig has a series of simple
one line commands to generate the information I want on first differences
and so forth. Unfortunately, I keep getting an error when running the zelig
function and was wondering if there was a quick alternative for generating
predicted probabilities for
2012 Aug 13
3
Using the effects package to plot logit probabilities
I'm trying to run a logit model and plot the probability curve for a number
of the important predictors. I'm trying to do this
with the Effects package.
df=data.frame(income=c(5,5,3,3,6,5),
won=c(0,0,1,1,1,0),
age=c(18,18,23,50,19,39),
home=c(0,0,1,0,0,1))
str(df)
md1 = glm(factor(won) ~ income + age + home,
data=df,
2012 Jul 05
2
Plotting the probability curve from a logit model with 10 predictors
I have a logit model with about 10 predictors and I am trying to plot the
probability curve for the model.
Y=1 = 1 / 1+e^-z where z=B0 + B1X1 + ... + BnXi
If the model had only one predictor, I know to do something like below.
mod1 = glm(factor(won) ~ as.numeric(bid), data=mydat,
family=binomial(link="logit"))
all.x <- expand.grid(won=unique(won), bid=unique(bid))
y.hat.new
2011 Dec 22
0
Finding predicted probabilities
I ran three logit models in R with the Zelig package and I'm trying to
compute the
predicted probabilities for a number of different values on the independent
variable.
My dep variable was accepted or decline and my indep variable is bid
amount, and varies.
So for a bid amount of 3, what's the expected probability of winning.
For a bid amount of 5, what's the expected probability of
2011 Dec 16
0
Incorrect Number of Dimensions in Zelig with setx()
I'm running an ordered logit in R with the Zelig package and am trying to
calculate some predicted probabilities. However, I get the following error
message.
> x.low <- setx(mod, cars=1)Error in dta[complete.cases(mf), names(dta) %in% vars, drop = FALSE] :
incorrect number of dimensions
I googled this problem and couldn't find anything, minus a question by
me on this same
2011 Dec 16
1
Zellig Error Message
I'm trying to calculate predicted probabilities in R with Zelig and keep
getting the following error.
Can anyone help?
> x.low <- setx(mod, type=1)Error in dta[complete.cases(mf), names(dta) %in% vars, drop = FALSE] :
incorrect number of dimensions
When I ran the model, I ran everything but the explanatory variable as a
numeric variable. Now, I'm trying everything and no
2009 Dec 07
0
zelig logit survey
When I use zelig to compute parameter estimates with "model = logit.survey",
I receive the following error:
Nicholas Carnes. 2007. "logt.surveyWarning message:
In eval(expr, envir, enclose) : non-integer #successes in a binomial glm!
I believe this is because the model is not using "quasibinomial" (see R-News
2003, Analyzing Survey Data in R, by Thomas Lumley). Is there
2008 Apr 11
1
Multinomial Logit Regression
Hi all,
I have a dataset with a response variable with three categories (1, 2, 3)
and a lot of continuous variables. I'd like to make a MLR with these
variables. I've been watching the libraries nnet and zelig for this purpose
but I don't understand them well.
I use a training sample data to make the MLR.
train.set <- sample(1:1000,1000*0.7)
I have done this:
library(nnet)
net
2007 Jun 05
1
logit model interpretation
Hello everyone
I appologize for my lack of experience in statistical methods. I am an R
user begginer and I am running a logit model using "zelig" and "pcse"
packages. I will go to the point and is that Im having problems with
interpreting the results of my models.. It is really simple (I guess for the
most advanced scholars) however I really dont understand how to interpret
2012 Feb 09
1
Finding all the coefficients for a logit model
Let's say I have a variable, day, which is saved as a factor with 7 levels,
and I use it in a
logistic regression model. I ran the model using the car package in R and
printed out the
results.
mod1 = glm(factor(status1) ~ factor(day), data=mydat,
family=binomial(link="logit"))
print(summary(mod1))
The result I get is:
Coefficients:
Estimate Std. Error z value
2010 Mar 10
1
trouble getting multinimial logit model to work properly
Greetings all,
please consider the following data:
#Build Data frame
Slope<-c(1.291370, 12.208500, 2.110930, 0.578990, 5.019520, 0.807444,
0.554079
, 1.257080, 0.241504 , 0.184337 , 0.383044 , 0.342021)
Exposure<-c(790.54, 1167.79 , 845.58 , 1082.47 , 1189.61 , 677.17 ,
2058.56 , 469.09
, 112.02 , 803.31 , 254.14 ,1336.16)
FwyDist<-c(11809.4222 ,10623.0458, 12279.6271,
2012 Sep 11
1
Plotting every probability curve
I don't have a logistic regression model and am trying to generate
probability curves for all possible combinations of
the variables. My logit model has 5+ variables, and I want to draw curves
for every scenario.
See code below. When home_owner is 0 and 1, I want curves. The same goes
for all other variables categories, so that
I have permutations for all possible combinations.
I've
2010 Jul 07
1
Different goodness of fit tests leads to contradictory conclusions
I am trying to test goodness of fit for my legalistic regression using several options as shown below. Hosmer-Lemeshow test (whose function I borrowed from a previous post), Hosmer–le Cessie omnibus lack of fit test (also borrowed from a previous post), Pearson chi-square test, and deviance test. All the tests, except the deviance tests, produced p-values well above 0.05. Would anyone please
2010 Jan 31
1
Running a Logit Model in R
I'm an R newbie and had the following question. I'm trying to run a logit model because I have a dependant variable that is a factor with three levels. Each of my independent variables are factor variables and have two or more levels, which is why I'm unsure about the error.
regone <- glm(data96$RV961327 ~ data96$RV960605 + data96$RV960610 + data96$RV960337 + data96$RV960385 +
2013 Jan 29
1
Finding predicted probabilities and their confidence intervals for a logit model
I want to construct a logit model, plot the probability curve with the
confidence intervals, and then I want to
print out a data frame with the predictor, response value, predicted value,
the low ci predicted value, and the
high ci predicted value. So it should look something like:
value low_ci prob hi_ci
5 0.10 0.12 0.13
6 0.11 0.13 0.16
7 0.13 0.15
2012 Oct 15
0
Error message with the effects package - 'Subscript out of bounds'
I am using the effects package to construct some probability graphs showing
the predicted probabilities from a logistic regression model.
However, I get an odd error message and don't know what the issue is.
When I attempt to generate the plots, I get the following error:
dat$won_ping = as.factor(dat$won_ping)
mod2 = glm(won_ping ~ our_bid +
age_of_oldest_driver2 +
credit_type2 +
2011 Dec 15
1
Reordering a numeric variable
I'm running a linear model in R using the car package.
I have a variable education, which i have recoded and regrouped to my
wishes.
However, R seems to place each element of that variable in alphabetical
order.
When I am running the model, don't I need the model order from lowest to
highest to make an inference that
a one unit change in one variable produced a one unit change in