status R-CMD-check Codecov test


Understating statistical models is difficult. Experimentation on models should be a part of the learning process. This package provides functions that generate ideal data for generalized linear models. Model parameters, link functions, sample size, and more are adjustable. With data controlled, models can be experimented on.

Is a sample size of 200 enough to get close estimates of the true weights?


simdata <- simulate_gaussian(N = 200, weights = c(1, 2, 3))

model <- lm(Y ~ X1 + X2 + X3, data = simdata)
#>              Estimate Std. Error   t value     Pr(>|t|)
#> (Intercept) 2.9138043  0.7011699  4.155633 4.843103e-05
#> X1          0.9833586  0.2868396  3.428253 7.403616e-04
#> X2          1.7882468  0.2701817  6.618683 3.386406e-10
#> X3          3.2822020  0.2640478 12.430334 1.550439e-26

The estimates are close to the weights argument. The mathematics behind the linear model worked well.

Addititional Examples in Vignettes

Try the GlmSimulatoR package in your browser

Any scripts or data that you put into this service are public.

GlmSimulatoR documentation built on May 29, 2024, 10:27 a.m.