모델 학습
이제 train.data에 로지스틱 반응 모델을 추정해 보겠습니다. 모델 선택 후 남은 예측 변수를 사용해 HOPPINESS의 구매 확률을 설명하세요. train.model을 살펴보고, margins() 함수를 사용해 이전에 적합한 extended.model과 결과를 비교하세요.
이 연습은 강의의 일부입니다
R로 만드는 반응 모형
연습 안내
train.data에 로지스틱 반응 모델을 추정하세요.HOPPINESS를price.ratio,FEAT.HOP,FEATDISPL.HOP으로 설명합니다.glm()함수와family인수binomial을 사용하고, 결과를train.model이라는 객체에 할당하세요.margins()함수를 사용해train.model객체를 살펴보세요.margins()함수를 사용해extended.model객체를 살펴보세요.
실습형 인터랙티브 연습
이 예제를 이 샘플 코드를 완성하여 풀어보세요.
# Fit the logistic response model to train.data
___ <- glm(___, family = binomial, data = ___)
# Investigate the train.model
___
# Investigate the extended.model
___