Displaying 20 results from an estimated 300 matches similar to: "Mlogit missing value problem"
2011 Dec 18
2
Dealing with NAs
Hi
I am trying to estimate parameter values with mlogit. I attach a part of my data.
My code is
x=mlogit.data(y,choice="voittaja",shape="long",id.var="id",alt.var="numero")
summary(mlogit(voittaja ~ Ie-1 , data=x, na.action=na.pass))
But i get
Error in if (abs(x - oldx) < ftol) { :
missing value where TRUE/FALSE needed
Because there is Na
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
2012 Nov 05
1
Error message in nmkb()
Hallo together,
I am trying to use the nmkb() optimizer and I have problems using the
function, as it causes the following error message
Fehler (error)* in while (nf < maxfeval & restarts < restarts.max & dist >
ftol & :
Fehlender Wert (missing value)* , wo (where)* TRUE/FALSE n?tig ist (is
required)*
*translation
Do I need to adjust the control ?
2007 Apr 05
1
Ignoring increment hint when maximized horz/vert
Here's a quick patch to have either horz or vert (instead of both) maximized windows honor the "ignore" option:
--- src/window.c
+++ src/window.c
@@ -4012,7 +4012,7 @@ constrainNewWindowSize (CompWindow *w,
if (d->opt[COMP_DISPLAY_OPTION_IGNORE_HINTS_WHEN_MAXIMIZED].value.b)
{
- if ((w->state & MAXIMIZE_STATE) == MAXIMIZE_STATE)
+ if (w->state
2012 Oct 18
3
Upper limit in nlsLM not working as expected
Dear all,
I am using the nlsLM function to fit a Lorentzian function to my experimental data.
The LM algorithm should allow to specify limits, but the upper limit appears not to work as expected in my code.
The parameter 'w', which is peak width at half maximuim always hits the upper limit if the limit is specified. I would expect the value to be in-between the upper and lower limit with
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 May 28
4
Matrix interesting question!
hi,
I have been trying to do this in R (have implemented it in Excel) but I have
been using a very inefficent way (loops etc.). I have matrix A (columns are
years and ages are rows) and matrix B (columns are birth yrs and rows are
ages)
I would like to first turn matrix A into matrix B
And then I would like to convert matrix B back again to the original matrix
A. (I have left out details of
2011 Oct 16
2
right justify right-axis tick values in lattice
How can I right justify the right-axis tick values? They appear in the
example below as left-justified.
I have tried several different ways and all fail in different ways.
The example below creates the right axis tick value with no attempt at
adjustment.
alternates I have tried are
1. formatting the values. This doesn't work because they are in a
proportional font and the blanks
are too
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")
2010 Feb 10
0
mlogit: Error reported using sample dataset
I've been working on a multinomial logit model, trying to predict
vegetation types as a function of total phosphorus. Previous responses to
my postings have pointed me to the mlogit package. I'm now trying to work
examples and my data using this package.
data("Fishing", package = "mlogit")
Fish <- mlogit.data(Fishing, varying = c(4:11), shape = "wide",
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 Aug 12
0
Mixed Logit model mlogit error
I am new to R but I have managed to use mlogit to run multivariate logit
models successfully. My data violates the Independence of Irrelevant
Alternatives assumption and now I would like to run a mixed logit model. It
is a "wide" data set with 9 independent (individual) variables and three
choices (variable Y). The database is in a cvs file called CAU.
This is the code I have run
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
2011 Nov 29
0
Single Variable mlogit formatting
Hello,
I'm trying to run a mlogit regression on my data, and have been unsuccessful
so far. The data I am working with consist of many observations of how
people react when given a certain number. I have just 2 data points per
observation: a number (there are ~300 different possible numbers) and then a
reaction (either 0, 1, or 2). The reactions are mutually exclusive and
exhaustive.
I am
2010 Nov 18
0
Mixed multinomial logit model (mlogit script)
Dear all,
I am trying to run a mixed multinomial logit model in R since my response variable has 4 non-ordinal categories. I am using the package mlogit that estimates the parameters by maximum likelihood methods. First of all, I prepared my data using the mlogit.data command. In the mlogit command, one can introduce alternative-specific (fixed factors??) and individual-specific (random
2010 Aug 13
1
mlogit error
Hi,
I'm trying to fit a multinomial logistic regression to my data which
consists of 5 discrete variables (scales 1:10) and 1000 observations.
I get the following error:
Error in `row.names<-.data.frame`(`*tmp*`, value = c("NA.NA", "NA.NA", :
duplicate 'row.names' are not allowed
In addition: Warning message:
non-unique value when setting
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)
>
2011 Oct 17
1
Creation of mlogit models from text file
Hello all,
Has anyone tried to create an R mlogit model object from a text file? If yes, what would be the best way to do it? I already have models that have been estimated using other software and would like to use R to help me make predictions for new data.
Thank you!
Bhargava Sana
[[alternative HTML version deleted]]
2012 May 29
0
mlogit package inquiry
Dear all,
? I am implementing a stochastic utility model that will eventually
make use of multinomial logit. I found that there is a package in R
called mlogit. I am not sure whether I have already found the correct
package or software. May I ask am I correct?
? Basically, let's say
? I have observations of n outcomes, for each outcome 1<=i<=n, they
were selected by a choice from a set