Question: For the data file, go to the R and type in >install.packages(alr4). data name: wm2 Give me the R and the step by the step
For the data file, go to the R and type in >install.packages(alr4). data name: wm2
Give me the R and the step by the step solution.
we considered data to predict wind speed CSpd at a candidate site based on wind speed RSpd at a nearby reference site where long-term data are available. In addition to RSpd, we have available the wind direction, RDir, measured in degrees. A standard method to include the direction data in the prediction is to divide the directions into bins and fit a separate mean function for CSpd on RSpd in each bin. The data file wm2 contains values of CSpd, RSpd, RDir, and Bin for 2002 for the same candidate and reference sites considered . Sixteen bins are used, the first bin for cases with RDir between 0 and 22.5 degrees, the second for cases with RDir between 22.5 and 45 degrees,..., and the last bin between 337.5 and 360 degrees. Both the number of bins and the starting point are arbitrary.
(a) Obtain an appropriate graphical summary of the data.
(b) Fit the four mean functions (coincident mean function, parallel mean functions, co-incident at zero, and general) using Bin as a categorical variable with 16 levels.
i. Why would it not make sense to treat Bin as a quantitative variable?
ii. How many parameters are in each of the mean functions?
iii. Is the coincident at zero mean function a sensible model for these data? Explain.
iv. Which pairs of models can be tested against each other? Conduct all possibletests.
v. Which mean function would you use to assess the viability of the candidate site for building a windmill farm?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
