รายงานการศึกษาค่าคาดการณ์อัตราการว่างงานของประเทศไทย

91 model(ARIMA(log(UNEM_RATE) ~ COVID, stepwise = F , approx=F)) report(fit_rate) rate_fc <- new_data(data, 60) |> mutate(COVID = 0) forecast(fit_rate, new_data = rate_fc) |> autoplot(data) + autolayer(fitted(fit_rate),col="blue", linewidth = 0.1) + labs(title="Unemployment RATE ( 100%)" , y = "Unemployment RATE") augment(fit_rate) |> features(.innov, ljung_box, dof = 6 , lag = 36) fit_rate |> accuracy() gg_tsresiduals(fit_rate) fc_rate <- forecast(fit_rate, new_data = rate_fc) View(fc_rate) View(tail(fitted(fit_rate), 12)) ## Train Test ## train_rate <- data |> filter_index(~ " 2020 Dec") test_rate <- data |> filter_index(" 2021 Jan"~.) fit_train_rate <- train_rate |> model(ARIMA(log(UNEM_RATE) ~ COVID, stepwise = F , approx=F)) report(fit_train_rate) fc_test_rate <- new_data(train_rate, 24) |> mutate(COVID = test_rate$COVID) forecast(fit_train_rate, new_data = fc_test_rate) |> autoplot(data) + autolayer(fitted(fit_train_rate),col="blue", linewidth = 0.1) + labs(title="Unemployment RATE Train:Test)", y = "Unemployment RATE") augment(fit_train_rate) |> features(.innov, ljung_box, dof = 6 , lag = 36) fit_train_rate |> accuracy() fit_train_rate |> forecast(new_data = fc_test_rate) |> accuracy(test_rate) gg_tsresiduals(fit_train_rate) fc_t_rate <- forecast(fit_train_rate, new_data = fc_test_rate) View(fc_t_rate)

RkJQdWJsaXNoZXIy MTA3NzA0Nw==