# Modeling votes on discrete outcomes with mlogit

I am looking to figure out do phone calls effect votes for a product in a product trial and I am wondering what the correct model design is.

I have a toy dataset below that describes my problem.

person = c(rep("A",4),rep("B",8), rep("C",2))
brand = c(1,2,3,4, 1,2,4,5,6,7,8,9, 4,15)
votes = c(3, 5, 7 , 5, 20,50, 30,10,5,5,10,5, 30,30)
pct_votes = c(.15,.25,.35,.25, 0.14814815, 0.37037037, 0.22222222 ,0.07407407 ,0.03703704, 0.03703704 ,0.07407407 ,0.03703704,.5,.5)
call_typeA = c(0,0,0,0, 0,0,3,1,0,1,1,0,0,0)
call_typeB = c(1,0,4,0, 1,0,1,0,0,0,1,0,0,0)
call_typeC = c(2,0,1,0, 4,0,2,1,3,1,0,0,0,0)

dat

1       A     1     3 0.15000000          0          1          2
2       A     2     5 0.25000000          0          0          0
3       A     3     7 0.35000000          0          4          1
4       A     4     5 0.25000000          0          0          0
5       B     1    20 0.14814815          0          1          4
6       B     2    50 0.37037037          0          0          0
7       B     4    30 0.22222222          3          1          2
8       B     5    10 0.07407407          1          0          1
9       B     6     5 0.03703704          0          0          3
10      B     7     5 0.03703704          1          0          1
11      B     8    10 0.07407407          1          1          0
12      B     9     5 0.03703704          0          0          0
13      C     4    30 0.50000000          0          0          0
14      C    15    30 0.50000000          0          0          0


There are 3 people and each of them use different brands in a trial period. Person A uses brands 1,2,3,4. Person B uses brands 1,2,4,5,6,7,8,9 and Person C uses brands 2 and 15. You can see the people do not use the same brands. Each person could have received different types of marketing calls during the trial. Each call is to a single person about a single brand. The different types of marketing calls are columns "call_typeA", "call_typeB" and "call_typeC". Some people like person C received no phone calls for any brand while person A received more 4 calls for brand 3. At the end of the trial the people were given votes to cast for each brand. The number of votes each person was given was not the same. Person A was given 20 votes, person B was given 135 votes and person C was given 19 votes. People then had to allocate their votes between the brands that used. This allocation happens at the brand level.

I would like to see if there is a relationship between receiving a phone call of type A, B or C and voting for a brand. i.e. Do the different phone call types increase the votes cast for a brand?

I was looking at using the mlogit R package and I thought this might be a discrete choice problem but it states in section 4.1 below the outcome variable is either 0/1, TRUE/FALSE or a FACTOR.

http://facweb.knowlton.ohio-state.edu/pviton/courses2/crp5700/5700-mlogit.pdf

1. It can be a 0=1 indicator, with a 0 indicating an unchosen alternative and 1
indicating which alternative was actually selected. For the clogit dataset,
the variable mode is of this type, so there’s nothing more you need to do.

2. It can be a logical variable, where the special name TRUE indicates the alternative
chosen, and FALSE indicates an alternative not chosen. Suppose that
your data had a variable cny coded as "c" for ‘chosen" and "nc" for “not
chosen". You could convert it to TRUE/FALSE as follows:
clogit$choice<-clogit$cny=="c". This says that the new variable is
TRUE when cny equals “c”, and (by implication) FALSE otherwise.6 Note
the dollar syntax on the left of the assignment: we want the new variable to
be part of the clogit dataframe.

3. It can be a factor taking on the values yes or no. In R, a factor is an efficient
way of storing a variable whose values are from a (typically small) number
of distinct possibilities. Instead of storing the full value for each observation,
R will store a list of the possible values and then, for each observation, an integer
indicating which one applies. This can save space, especially when the
values are repeated character strings. To create this type of choice indicator,
try clogit$choice<-factor(clogit$mode,labels=c("no","yes"))


In my case the outcome variable is the number of vote or votes. It is not simply 0/1, TRUE/FALSE or a FACTOR.

FYI: In the pdf (section 4.4) above I also have a varying choice set. Each person has different brands.

Any idea on how to model this to to see if there is a relationship between receiving a phone call of type A, B or C and voting for a brand? Can mlogit be used here? What would the left hand and right hand side of a regression look like?

Can I use the proportion each person voted on a brand as a weight somehow?

Should multinomial not be used here and can instead just model the proportion of votes with say the frm R package?

Thank you.