Question: Let us instead see what the estimates would be if the penalty was 1 1 4 9 8 . Store your output to tidy 2

Let us instead see what the estimates would be if the penalty was 11498. Store your output to tidy2. What do you notice?
# Your code here
# tidy2<-
tidy2<- tidy(fit(ridge_spec, Salary ~ ., data = Hitters, penalty =11498))
# Print the parameter estimates for penalty =11498
tidy2
# your code here
Error in `check_form_dots()`:
! These argument(s) cannot be used to create the data: `penalty`. Possible arguments are: `subset`,`weights`
Traceback:
1. tidy(fit(ridge_spec, Salary ~ ., data = Hitters, penalty =11498))
2. fit(ridge_spec, Salary ~ ., data = Hitters, penalty =11498)
3. fit.model_spec(ridge_spec, Salary ~ ., data = Hitters, penalty =11498)
4. form_xy(object = object, control = control, env = eval_env, target = object$method$fit$interface,
....)
5..convert_form_to_xy_fit(formula = env$formula, data = env$data,
...., composition = target, indicators = indicators, remove_intercept = remove_intercept)
6. check_form_dots(dots)
7. rlang::abort(glue::glue("These argument(s) cannot be used to create the data: ",
. glue::glue_collapse(glue::glue("`{names(x)[!good_names]}`"),
. sep =","),". Possible arguments are: ", glue::glue_collapse(glue::glue("`{good_args}`"),
. sep =",")))
8. signal_abort(cnd,.file)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!