Directions:
In a previous lab you worked with the “TSA claims” data set, which contains information on a random sample of \(n=5000\) claims made against the Transportation Security Administration by travelers.
tsa_data = read.csv("https://remiller1450.github.io/data/tsa_small.csv")
filter() function
(introduced in Lab
5) to create a subset of the TSA claims dataset that only contains
claims whose status is “Settled” and whose claim amount is
greater than zero. These are claims where the TSA settled, meaning they
agreed to pay the claimant somewhat less than they asked for.claim_amount (how much the traveler asked for in damages)
and close_amount (the settled amount that the TSA actually
paid them). Describe the strength, form, and direction of the
relationship you see.claim_amount or close_amount,
should be the explanatory variable in the regression model?
Which should be the response variable? Briefly explain.lm() function to fit
the model, then use the summary() function to print a
summary of it. Based upon this output, write out the fitted model
equation.plot() function to
create the two diagnostic plots covered in Lab 9. Do the assumptions of
the model proposed in Part D seem appropriate? Briefly explain.log() function). Recreate the diagnostic plots you made in
Part H using this model, then briefly comment upon whether the model
using log-transformed data seems more appropriate for statistical
inference, based on the residual diagnostics.\(~\)
The data below were collected by The College Scorecard on all primarily undergraduate colleges in the US in the year 2024. Recall that you worked with these data on our previous homework assignment.
colleges2024 = read.csv("https://remiller1450.github.io/data/Colleges_2024_Complete.csv")
Avg_Fac_Salary by Region.
Briefly describe whether there appears to be substantial variability in
Avg_Fac_Salary across regions. Hint: You made this
type of graph in Lab
5Avg_Fac_Salary as the outcome and Region as a
categorical predictor. Print a summary of the fitted model.table() function to
produce a frequency table showing how many colleges are located in each
region. Comparing this table to the output from Part B, which region did
the model use as its reference category?RegionPacific. Is there statistically significant
evidence that the mean Avg_Fac_Salary for colleges in this
region differs from the reference category?Region as a categorical predictor to compare the mean
values of Avg_Fac_Salary for the New England and Pacific
regions. Briefly explain how we’d need to modify our initial model so
that this comparison is provided in the output produced by the
summary() function.