주성분 회귀모형 추정 이후 새로운 데이터에 대한 반응치를 예측한다.

predict_pcr(.fit, .new_data, ...)

Arguments

.fit

주성분 회귀모형 추정 결과.

.new_data

새 관측 데이터 프레임.

...

함수 predict_linear_regression() 수행 시 사용할 파라미터 값.

Value

예측값 데이터 프레임.

Examples

data(biometric, package = "dmtr") fit <- fit_pcr(biometric, weight, c(age, height), .pc = 1L) predict_pcr(fit, biometric)
#> # A tibble: 10 × 1 #> .pred #> <dbl> #> 1 65.2 #> 2 66.2 #> 3 65.3 #> 4 65.5 #> 5 66.3 #> 6 64.6 #> 7 65.6 #> 8 64.9 #> 9 65.7 #> 10 64.8