I recently posted a question with many parts and I'd like to focus in on just one issue that I didn't emphasize in the original post.
My data is a list of records, each one representing an educational seminar event. I have a continuous variable that represents the revenue brought in by each seminar, which is the response variable in my regression. I also have a number of categorical variables which are acting as factors/IVs.
One of those categorical factors is the speaker hosting the event. The trouble is that sometimes more than one speaker hosts a particular event. To date, all our speakers have been drawn from a pool of 154. Most of the time, just one speaker is used, but in about 10% of the data points, two, three or even four speakers were used. Currently, this is represented in my data with slashes ("Speaker One / Speaker Two / Speaker Three"). I've written a Python script that can find the average revenue on a given date interval for seminars which take a given level of a categorical variable (for example, it could return the average revenue for all seminars in 2008 that for which Speaker One was the host)...my script can read the multiple speaker format fine, reading names on opposite sides of a " / " as separate speakers.
Unfortunately, R doesn't seem to be able to do anything like that...I've run a multiple regression on my data and obviously it treats "Speaker One", "Speaker Two" and "Speaker One / Speaker Two" as three different speakers. My multiple r-squared value is less than 0.5 so I'm hoping that resolving this issue would help improve the model...how best to proceed?
speaker
variable into a set of new variablesspeaker1
,speaker2
, (etc), with some instances where more than one variable has a 1 in it? Would that solve your problem? $\endgroup$y~.
. Check out this for more info. $\endgroup$