posterior_binary_logistic_regression: 이분 로지스틱 회귀분석 사후확률 추정.

posterior_binary_logistic_regressionR Documentation

이분 로지스틱 회귀분석 사후확률 추정.

Description

주어진 계수를 이용하여 새 데이터에 대해 사후확률을 추정한다.

Usage

posterior_binary_logistic_regression(
  .betas,
  .new_data,
  .xvar,
  .reflevel = 0L,
  .poslevel = 1L
)

Arguments

.betas

이분 로지스틱 회귀분석 계수

.new_data

새 관측 데이터 프레임.

.xvar

범주 분류에 사용될 변수.

.reflevel

이분 범주에서 0(negative) 값을 지닐 범주값. Default: 0.

.poslevel

이분 범주에서 1(positive) 값을 지닐 범주값. Default: 1.

Value

각 범주별 사후확률.

Examples

data(student, package = "dmtr")
fit <- fit_binary_logistic_regression(student, y, c(x1, x2, x3), .reflevel = "보통")
posterior_binary_logistic_regression(fit$betas, student, c(x1, x2, x3),
  .reflevel = "보통", .poslevel = "우수")


youngroklee-ml/dmtr documentation built on June 12, 2022, 6:24 p.m.