# NOT RUN {
set.seed(1)
N <- 100
X1 <- rnorm(N)
X2 <- rnorm(N)
d <- data.frame(
y = rpois(n = N, lambda = exp(4 + X1 * 2 + X2 * 6)),
x1 = X1,
x2 = X2)
fit <- glm(y ~ x1, data = d, family = poisson())
mt <- GOF_model(
model = fit,
data = d,
nmb_boot_samples = 100,
simulator_type = "parametric",
y_name = "y",
Rn1_statistic = Rn1_KS$new())
mt$get_pvalue()
fit <- glm(y ~ x1 + x2, data = d, family = poisson())
mt <- GOF_model(
model = fit,
data = d,
nmb_boot_samples = 100,
simulator_type = "parametric",
y_name = "y",
Rn1_statistic = Rn1_KS$new())
mt$get_pvalue()
# }
Run the code above in your browser using DataLab