similar to: Finding predicted probabilities

Displaying 20 results from an estimated 1000 matches similar to: "Finding predicted probabilities"

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,
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
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
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 <-
2012 Aug 08
1
Calculating percentages across multiple columns
I have the following data and am trying to find the percentage of bid values purchased for that price. So let's say I have a bid of 5 and it's sold 2 times for $3 and $5. Since the original bid was $5, the percentage of times that that bid value results in a sold purchase AT that specific bid level was 1/3 because of the three time where the bid was three, it ended up being sold for $5
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
2009 Feb 19
0
Zelig method setx()
Hello, I am attempting to "automate" a Bayesian normal linear regression using Zelig. Basically, I have a list containing several zelig() objects, each having a different formula, same data set, and same model (normal.bayes). My problem lies in the setx() method, where I am setting a numeric parameter to a value other than the mean. This is straightforward if I input the parameters
2011 Jan 25
0
Problem with matchit() and zelig()
Dear all, Does anybody know why the following code returns an error message? >library(MatchIt) >library(Zelig) >data(lalonde) > >m.out1<-matchit(treat~age+educ+black+hispan+nodegree+married +re74+re75, method="full", data=lalonde) > >z.out1<-zelig(re78~age+educ+black+hispan+nodegree+married+re74+re75, data=match.data(m.out1, "control"),
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,
2011 Nov 17
1
Error When Installing the RODBC Package
I'm running R in Ubuntu 10.10 and am trying to install the RODBC package. However, I get the following error message: ERROR: configuration failed for package ‘RODBC’ * removing ‘/home/amathew/R/i686-pc-linux-gnu-library/2.13/RODBC’ The downloaded packages are in ‘/tmp/RtmpekzPOQ/downloaded_packages’ Warning message: In install.packages() : installation of package 'RODBC' had
2011 Dec 21
1
Predicting a linear model for all combinations
Lets say I have a linear model and I want to find the average expented value of the dependent variable. So let's assume that I'm studying the price I pay for coffee. Price = B0 + B1(weather) + B2(gender) + ... What I'm trying to find is the predicted price for every possible combination of values in the independent variables. So Expected price when: weather=1, gender=male weather=1,
2012 Feb 09
1
Grouping together a time variable
I have the following variable, time, which is a character variable and it's structured as follows. > head(as.character(dat$time), 30) [1] "00:00:01" "00:00:16" "00:00:24" "00:00:25" "00:00:25" "00:00:40" "00:01:50" "00:01:54" "00:02:33" "00:02:43" "00:03:22" [12]
2012 Aug 02
1
Naive Bayes in R
I'm developing a naive bayes in R. I have the following data and am trying to predict on returned (class). dat = data.frame(home=c(0,1,1,0,0), gender=c("M","M","F","M","F"), returned=c(0,0,1,1,0)) str(dat) dat$home <- as.factor(dat$home) dat$returned <- as.factor(dat$returned) library(e1071) m <- naiveBayes(returned ~ ., dat) m
2005 Jan 06
0
package Zelig problem with setx
Hi! Does somebody out there has experience with the Zelig package from Harvard uni? I have a problem when trying to set the explanatory variables with setx Polytomous logistic regression: >z.out <- zelig(OPARS ~ v1+v2+v3+...+vn, model = "mlogit", data=heb) that's OK >x.out<-set(z.out) Error in seq.Date(along = object) : `from' must be specified #??? I have no date
2012 Jul 19
3
Removing values from a string
So I have the following data frame and I want to know how I can remove all "NA" values from each string, and also remove all "|" values from the START of the string. So they should something like "auto|insurance" or "auto|insurance|quote" one = data.frame(keyword=c("|auto", "NA|auto|insurance|quote", "NA|auto|insurance",
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
2010 Dec 21
0
"variable lengths differ (found for '(weights)')" error in Zelig library
Dear R users, I am trying to estimate to estimate the average treatmen effect on the treated (ATT) using first the MatchIt software to weight the data set and, after this, the Zelig software as shown in Ho et al. (2007). See here for an explanation of how to apply this technique in R: http://imai.princeton.edu/research/files/matchit.pdf I encounter a slight problem when I apply the weights that
2011 Apr 26
2
Wish R Core had a standard format (or generic function) for "newdata" objects
Is anybody working on a way to standardize the creation of "newdata" objects for predict methods? When using predict, I find it difficult/tedious to create newdata data frames when there are many variables. It is necessary to set all variables at the mean/mode/median, and then for some variables of interest, one has to insert values for which predictions are desired. I was at a
2011 Jul 06
0
matching, treatment effect-ATT and Zelig package
Hi there, I'm wondering what Zelig in the following situation (code below) actually does. Is this considered as a so called regression adjustment after the propensity score matching? library(MatchIt) library(Zelig) data(lalonde) re78 represents the outcome variable 1. With Zelig m.out <- matchit(treat ~ age + educ + black + hispan + married + nodegree + re74 + re75, data = lalonde)