결정계수(R-squared) 사후분포
먼저 모델이 어느 정도 예측력을 보일지 추론할 수 있도록, 결정계수(R-squared) 통계량의 사후분포를 구해 보겠습니다. Spotify 데이터를 사용한 stan_model은 이미 로드되어 있습니다.
이 연습은 강의의 일부입니다
rstanarm으로 배우는 Bayesian 회귀 모델링
연습 안내
- 결정계수(R-squared) 통계량의 사후분포를 계산하세요
- R-squared 분포의 히스토그램을 만드세요
실습형 인터랙티브 연습
이 예제를 이 샘플 코드를 완성하여 풀어보세요.
# Calculate the posterior distribution of the R-squared
r2_posterior <- ___(stan_model)
# Make a histogram of the distribution
___(r2_posterior)