R Question

Programming

R language

UofM

### Question Description

The detailed assignment is post in attached file. Only need question 1 to 5.

Need to know and use R project !!!

### Unformatted Attachment Preview

Homework 2 20 points Due Friday 1/22 by 5PM, No Late HW is accepted Important: In order to get full credits for the homework, you need to submit two files 1: 1. The word/pdf file along your answers for each of the question 2. The R script file with your own code Note that if you are using Rmarkdown, you can knit the entire document to a pdf that will include your code and submit that. There is an R_help file on Canvas under Files-> Homework 2 -> Rhelp. All the data files are under the same folder. 1. Application (15 points) In the ‘Files->hw2’ folder, there is a hw2_d1b1.csv file that contains an airport data file. The data contain the total number of passengers that originate at each airport in the US on a quarterly basis in 2007. The variables are: Passengers=total passengers in each quarter that originate from the origin. Mktfare=average fare (per trip) for all trips that originate from the origin. Mktmilesflown=average distance traveled for all trips that originate from the origin Year=year (2007) Quarter=1, 2, 3, 4 Origin=common airport codes e.g., EUG, PDX, SFO, etc. Also, in the same folder is a file hw2_inc_pop.csv that contains average county level income and total population in counties within 20 miles of the airport. But, these are only available for 100 airports. 1. (4 pts) Merge these data together and drop those that do not merge. Run a regression of passengers on fare, mktmilesflown, population and income. Do all tests at the 5 percent level and draw a diagram of the statistics pdf identifying the critical and statistic level. a. Test whether the coefficient on fare is zero or positive (this is the null). b. Test whether incomes matter. 2. (2 pts) Add in quarter dummies, and test whether the quarter dummies are needed at the 5 percent level. 3. (2 pts) Run the same model in 1, only this time in natural logs. a. Test whether the elasticity of demand is significant or not the 5 percent level. b. Test whether air travel is a luxury good at the 5 percent level (please use <= as the null). 1 If you are using R markdown, you can submit one file with both codes and answers together in either html/word/pdf format. 4. (2 pts) Using the model in 1, what is the elasticity of demand for a fare at the 10, 50, and 90 th percentile of quantities (use overall averages for all of the RHS variables except mktfare). 5. (5 pts) Present a table (with a title) of results in 1, 2, and 3 (R2, variables, coefficient estimates and standard errors. Develop a graph of passengers against marketfare mktfare plotted against mktmilesflown (fix income at the average value) for the model estimated in 1 and the model estimated in 3. II. T/F (5 points) 1. T F Demand functions always slope downward 2. T F If consumers are heterogeneous, market demand cannot be given by the horizontal summation of individual demands. 3. T F If the marginal rate of substitution between other goods (x) and transportation (T) i.e., dx/dT is -20, and the slope of the budget constraint is -2, the consumer should buy more T and less x. 4. T F Pickrell (1984) found that the cost of driving and the time of driving do not affect the demand for air travel, and so there is no basis for promoting shortline travel by air since it will not shift people from cars. 5. T F When a consumer consumes both transportation and another good and they are optimizing, then the MU of each good must be positive and the at the values of transportation and the other good, the marginal utility functions must be falling. ...
Student has agreed that all tutoring, explanations, and answers provided by the tutor will be used to help in the learning process and in accordance with Studypool's honor code & terms of service.

This question has not been answered.

Create a free account to get help with this and any other question!