1
$\begingroup$

I am examining the effect of a binary variable (rural vs urban) on my dependant variable (total mileage expense). Essentially, a person (n) will do X amount of trips in one year, and Y trips will be to rural areas, and Z trips will be to an urban area.

So the variables I have for each person (n) are essentially: Total Mileage Expense, Y(Rural Trips), Z(Urban Trips), and X(Total Trips)

I am trying to find the average Mileage expense for an Urban trip and the average Mileage expense for Rural. I have tried using the proportion of Rural Trips to Total trips as my independent variable and the Average Mileage expense as dependant but I was not sure how to specify the model.

Any ideas or help would be greatly appreciated, I am not very statistically inclined. Also note that Y(Rural Trips) is zero-heavy, with approx. 50% having value of 0.

Thanks!

$\endgroup$

1 Answer 1

1
$\begingroup$

If you just want the average mileage expense and nothing else, just split your dataset into two sets (rural trips and urban trips), total the expenses, and divide by the number of trips. If you're looking to test a statistically significant relationship, read on:

If half of your rural trips are zero, then it most likely holds that half of your urban trips are also, unless there is an unaccounted-for category. If so, that's one very well distributed binary variable.

Since you just have two mutually-exclusive trip categories, a dummy variable will suffice. A dummy variable is a variable where there are only two possible outcomes, basically construed as "is it or isn't it?" What I mean by that is that the variable takes the value of 1 if the observation is true, and 0 if false. So, if you're testing gender, you pick one of the two genders, and code all your observations according to that gender. If you pick male, every person who is male takes on the value of 1, and every not-male (female) takes on 0. Then when you look to see what the effect of that variable is on your dependent variable, you say that being male increases/decreases Y, relative to being female. The same will work for rural/urban. Pick one--it doesn't really matter which, especially since they're so evenly distributed. Say you pick urban. You code every trip to an urban locale as 1, and every trip to a rural locale as 0. Then you only use that variable. (If you made a dummy for rural and a dummy for urban, they would cancel each other out. There's a concept called multicollinearity, where if two variables vary too closely with each other, it skews the results. Many stats programs will actually just drop one of the variables if you try to include both.)

So, you use your urban dummy variable, with mileage expense as the dependent variable. Whatever your beta is for urban is the effect of an urban destination on expense, relative to going to a rural destination. Don't forget to say that part. So, say your beta comes back as 25.8, and it's significant. If your expenses are measured in dollars, that means that heading to an urban location is predicted to increase your expense by $25.80, relative to driving to a rural location.

$\endgroup$
4
  • $\begingroup$ However, a few things to add to my initial explanation. I cannot split the dataset into two sets (rural trips and urban trips), because I simply do not have this data. The only thing I have is the total mileage and how many of each trip (rural and urban) each person did. For example, I know that person 1 had total mileage expense of $1200, and that 22 were urban and 5 were rural. I do not know the mileage expense for each trip, and for that reason I am unable to split the dataset and just divide by the total amount of trips. $\endgroup$
    – John Ilea
    Sep 30, 2014 at 13:58
  • $\begingroup$ Also, I want to clarify what I meant by saying Rural trips are 0 heavy. I do not mean that the mileage expense if 0 for half the trips, I do not know what proportion of trips are 0 or non-zero. What I was saying is that about half the presenters did not have any rural trips at all, for example 56 urban trips and 0 rural. I'm not sure but I think I might need a model that looks at the proportion of urban to rural trips as this is essentially the only data I have. Thanks again! $\endgroup$
    – John Ilea
    Sep 30, 2014 at 14:00
  • $\begingroup$ Got it! That's a tricky one. I can see how computing rural as % of urban or vice versa may be the only way to do this, but I do see a problem in that you have no way of knowing if the urban/rural differs greatly from person to person. Maybe one person lives 100 miles from a big city, and another lives 10 miles. The first does 100 rural and 10 urban trips, the other does 100 urban and 10 rural. Your mileage expense could be the same. Or even if everyone is starting from the same point, they could be picking different rural/urban destinations that balance out the differences between them. $\endgroup$
    – ShannonC
    Sep 30, 2014 at 15:18
  • $\begingroup$ ^ Just a thought... I'm sorry I don't have a better solution! Perhaps someone else will come up with something. $\endgroup$
    – ShannonC
    Sep 30, 2014 at 15:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.