Question: Prepare for later development of a model to predict costs by developing reliable imputations for missing costs. Remove the observation having zero totcst. g a.
Prepare for later development of a model to predict costs by developing reliable imputations for missing costs. Remove the observation having zero totcst.
g
a. The cost estimates are not available on 105 patients. Total hospital charges (bills) are available on all but 25 patients. Relate these two variables to each other with an eye toward using charges to predict totcst when totcst is missing. Make graphs that will tell whether linear regression or linear regression after taking logs of both variables is better.
b. Impute missing total hospital costs in SUPPORT based on a regression model relating charges to costs, when charges are available. You may want to use a statement like the following in R:
support ← transform (support , totcst = ifelse(is.na(totcst),
(expression_in_charges), totcst ))
If in the previous problem you felt that the relationship between costs and charges should be based on taking logs of both variables, the “expression in charges” above may look something like exp(intercept +
slope * log(charges)), where constants are inserted for intercept and slope.
c. Compute the likely error in approximating total cost using charges by computing the median absolute difference between predicted and observed total costs in the patients having both variables available. If you used a log transformation, also compute the median absolute percent error in imputing total costs by anti-logging the absolute difference in predicted logs.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
