# You can use this code in Q9a, but you'll only get partial credit if you run
# the checks called for by the question.  If you use it and don't run the
# checks, you'll get zero points for Q9a --- but your grades for other problems
# will be unaffected.

# This is part of the solutions, so please don't share it, even after the
# semester is over.




# Estimate a fixed kernel regression formula on a data set. Return predictions.
# Input:
  # Data frame (input_df)
# Output:
  # Vector of predictions of kernel regression of Return_10_fwd ~ MAPE
# Presumes:
  # Data has columns named "Return_10_fwd" and "MAPE"
  # Both columns are real-valued
npr.preds <- function(input_df){
  kern.reg <- npreg(Return_10_fwd ~ MAPE, data = input_df)
  return(fitted(kern.reg))
}
