similar to: Dealing with NAs

Displaying 20 results from an estimated 1000 matches similar to: "Dealing with NAs"

2011 Dec 19
1
Mlogit missing value problem
Hi After good advices i post this problem here again. Now the attached sambledata is in csv form and it is a part of my real data. I have tried different na.action operations but the result stays the same... My code > library(mlogit) > library(foreign) > z<-odbcConnectExcel("D:\\SAMBLEDATA.csv") > y<-sqlFetch(z,"Taul1") >
2011 Oct 25
1
McFadden r^2 and the inrercept
Hi I have estimated parameters of my data with mlogit and the following commands. I would like to know also the McFadden R^2 and the intercept, could soweone tell me how that can be done? library(RODBC) library(mlogit) library(foreign) z<-odbcConnectExcel("D:\\MALLI11ARVOT.xls") y<-sqlFetch(z,"Taul1")
2013 Mar 19
0
mlogit: block design CE model
Hi, I am trying to use mlogit in R to analyse a block design choice experiment dataset. The 12 choice sets/cards have been randomly assigned to 3 different blocks and each respondent answers all sets from one block (i.e. each respondent chooses from 4 choice sets). In total I have 2336 rows of data from 292 respondents. The data looks like this (2 of the three blocks): ID Sex Age Block Card
2011 Aug 25
1
duplicate 'row.names' are not allowed???
Hi I have an example file in excel and i have following instructions to open and analyze the data in it. > library(RODBC) > library(mlogit) > z<-odbcConnectExcel("C:\\2008 Racedata.xls") Everything ok untill the next command > x<-mlogit.data(y,choice="winner",shape="long",id.var="datekey",alt.var="horseno") Error in
2010 Mar 07
3
mlogit
I am trying to follow this example for multinomial logistic regression http://www.ats.ucla.edu/stat/r/dae/mlogit.htm However, I cannot get it to work properly. This is the output I get, and I get an error when I try to use the mlogit function. Any ideas as to why this happens? > mydata <- read.csv(url("http://www.ats.ucla.edu/stat/r/dae/mlogit.csv")) > attach(mydata) >
2012 Apr 19
1
mlogit learning error
I am learning five mlogits as follows v1.model<-mlogit(v1~1|v2+v3+v4+v5, data=mlogit.v1.data, reflevel="1") v2.model<-mlogit(v2~1|v1+v3+v4+v5, data=mlogit.v2.data, reflevel="1") v3.model<-mlogit(v3~1|v1+v2+v4+v5, data=mlogit.v3.data, reflevel="1") v4.model<-mlogit(v4~1|v1+v2+v3+v5, data=mlogit.v4.data, reflevel="1")
2012 Oct 01
2
mlogit and model-based recursive partitioning
Hello: Has anyone tried to model-based recursive partition (using mob from package party; thanks Achim and colleagues) a data set based on a multinomial logit model (using mlogit from package mlogit; thanks Yves)? I attempted to do so, but there are at least two reasons why I could not. First, in mob I am not quite sure that a model of class StatModel exists for mlogit models. Second, as
2010 Feb 24
2
mlogit is not an S4 object error
Hello, I've been getting the following error when using the mlogit function from the mlogit package This is one of the examples provided in the Package "mlogit" January 27, 2010 description data("Fishing", package="mlogit") Fish <- mlogit.data(Fishing, varying = c(4:11), shape="wide", choice="mode") summary(mlogit(mode ~ pr + ca - 1,
2011 Mar 13
2
Problem implementing 'waldtest' when using 'mlogit' package
Hi all, I have been working through the examples in one of the vignettes associated with the 'mlogit' package, 'Kenneth Train's exercises using the mlogit package for R.' In spite of using the code unchanged, as well as the data used in the examples, I have been unable to run a Wald test to test two models. Specifically, I have run the following command, where mc and mi2 are
2010 Jun 03
1
mlogit and weights
Hello, I can't figure out why using and not using weights in mlogit yields identical results. My motivation is for the case when an "observation" or "individual" represents a number of individuals. For example, library(mlogit) library(AER) data("TravelMode", package = "AER") TM <- mlogit.data(TravelMode, choice = "choice", shape =
2011 Apr 10
2
Multinomial Logit Model with lots of Dummy Variables
Hi All, I am attempting to build a Multinomial Logit model with dummy variables of the following form: Dependent Variable : 0-8 Discrete Choices Dummy Variable 1: 965 dummy varsghpow at student.monash.edu.augh@gp1.com Dummy Variable 2: 805 dummy vars The data set I am using has the dummy columns pre-created, so it's a table of 72,381 rows and 1770 columns. The first 965 columns represent
2008 Apr 12
2
Predict Function
Hi all - my first time here and am having an issue with the Predict function. I am using a tutorial as a guide, locate here: http://www.ats.ucla.edu/STAT/R/dae/mlogit.htm My code gives this error > newdata1$predicted <- predict(mlogit,newdata=newdata1,type="response") Error in `$<-.data.frame`(`*tmp*`, "predicted", value = c(0.332822934960197, : replacement has
2016 Apr 01
1
reduced set of alternatives in package mlogit
Hi Jose, You're referring to your response variable when you're saying it's missing some of the choices, right? Are your response choices ever known or do they just occur with extremely low frequency? Either way, I think the mlogit package would be inappropriate for you. I imagine you would have much better luck using MCMCpack or writing a model with rstan or something Bayesian.
2010 Feb 14
1
mlogit function cut off formular
I'm trying to fit a multinominal logistic model using package mlogit. I have 15 independent variables. The code looks like this: m<-mlogit(score~0|f1+f2+f3+f4+f5+f6+f7+f8+f9+f10+f11+f12+f13+f14+f15, data, reflevel="1") And it gives the following error message: Error in parse(text = x) : unexpected ')' in "score ~ 0 + alt:(f1 + f2 + f3 + f4 + f5 + f6 + f7 + f8 + f9
2011 Jun 20
1
Stepwise model comparisons for mlogit
I am trying to perform a backwards stepwise variable selection with an mlogit model. The usual functions, step(), drop1(), and dropterm() do not work for mlogit models. Update() works but I am only able to use it manually, i.e. I have to type in each variable I wish to remove by hand on a separate line. My goal is to write some code that will systematically remove a certain set of variables
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]]
2011 Feb 28
4
mlogit.data
I am trying to estimate multinomial logit models off of a .csv table in IDCASE IDALT format where I have ROWS HHID PERID CASE ALTNUM NUMALTS CHOSEN IVTT OVTT TVTT COST DIST WKZONE HMZONE RSPOPDEN RSEMPDEN WKPOPDEN.... 1 1 2 1 1 1 5 1 13.38 2.00 15.38 70.63 7.69 664 726 15.52 9.96 37.26 2 2 2 1 1 2 5 0 18.38 2.00
2017 Jul 27
2
Error in `[[<-.data.frame`(`*tmp*`, alt.name, value = integer(0)) with mlogit
Hi, Please help about the error I am getting after the h1.dat<- line : this line worked with much more independant variables and bigger data. This time I want to work with just 2 variables cteD & cteTh. What is wrong ? > setwd("C:/Rstudio/Trot") > library(mlogit) > horse1.data<-read.csv("cte2.csv") >
2016 Apr 01
0
reduced set of alternatives in package mlogit
-----Original Message----- From: Bert Gunter [mailto:bgunter.4567 at gmail.com] Sent: quinta-feira, 31 de mar?o de 2016 20:22 To: Jose Marcos Ferraro <jose.ferraro at LOGITeng.com> Cc: r-help at r-project.org Subject: Re: [R] reduced set of alternatives in package mlogit code? example data? We can only guess based on your vague post. "PLEASE do read the posting guide
2011 Jun 22
1
mlogit model that contains both individual-specific parameters and universal parameters
Hello,  I am pretty new to mlogit, and still trying to figure out what models to use.I have a data set of N individuals, each of which faces I alternatives. The utility function of individual n, for choice i is:  u(i,n) = alpha(i) * x1(i,n) + beta * x2(i,n)  where alpha(i) is the individual specific parameter, and beta is shared among all individuals. I don't really know how to set this up