LoginSignup
0
0

More than 3 years have passed since last update.

負の二項分布を前提としたGLM

Posted at
# データの読み込み
url <- 'https://raw.githubusercontent.com/ozt-ca/tjo.hatenablog.samples/master/r_samples/public_lib/jp/poisson_negbinom_sample.txt'
sample <- read.table(url, header = T)

# データの概要
head(sample)
sum(is.na(sample))

# 負の二項分布のパッケージ用意
install.packages("MASS")
library(MASS)

# モデルの学習
model.glmnb <- glm.nb(click ~ ., sample)
summary(model.glmnb)

# 説明変数の絞り込み 変数減少法
stepAIC(model.glmnb)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0