there are some linked questions but I really can not make any sense out of it. I am new to statistics, R, the mlogit package and also to stockoverflow. I will try to ask my question as precisely as possible. Here is [a link to the data ].(https://docs.google.com/spreadsheets/d/1IvN6ZgCgDERu3Mn4AglZMjicoXnFQQHc9GhAhbrpFRI/edit?usp=sharing) I have a data set from a discrete choice experiment with a dependent variable "choice" with two levels (yes/no) and 4 independent variables with each 3 levels.
I try to estimate with mlogit but I have some real problems and my supervisor is not able to help. In my dataset the values for each variable are either 1,2,3, (1 for brand 1, 2 for brand 2, etc...)
t1 <- read_csv("~/Dokumente/UvA/Thesis/R/t1.csv")
t1 <- mlogit.data(data=t1, choice="choice",shape="long",alt.levels=paste("pos",1:4),id.var="id")
To run the estimation I use the following function:
m1 <- mlogit(choice~ 0 + Brand+ Features+ Valence+ Volume, data=t1)
summary(m1)
and got this outcome: model 1 estimates and noticed that Rstudio interpreted my data set variables as integer. As the variables are 3 different brands, 3 different features and 3 different categories of valenve and volume (low, med and high), I would like to include the estimates of the levels. I therefore tired to upload them into Rstudio and specified them as characters using this function
library(readr)
t1 <- read_csv("~/Dokumente/UvA/Thesis/R/t1.csv",
col_types = cols(Brand = col_character(),
Features = col_character(), Valence = col_character(),
Volume = col_character()))
If I run the same mlogit function now, I get an error:
Error in solve.default(H, g[!fixed]) : system is computationally singular: reciprocal condition number = 3.11303e-18
When I use characters for the different levels (e.g. brand names instead of 1,2,3 see data sheet 2"t2") I have the same singularity problem. a) Does the outcome make any sense if I use the numbers in the first data set? b) how can I integrate my values as characters to estimate the attribute levels?
I hope someone can help me because I am really confused and new to all of this. I am most certainly making an very basic or stupid mistake.
Cheers