fit | R Documentation |
fit()
is a generic to fit a specified model.
fit(x, data, ...)
## Default S3 method:
fit(x, data, ...)
x |
An R object |
data |
A data frame containing the data to fit. |
... |
Arguments passed to underlying methods. |
The value returned depends on the class of the input argument.
Tim Taylor
fit.trending_model()
and fit.list()
x = rnorm(100, mean = 0)
y = rpois(n = 100, lambda = exp(1.5 + 0.5*x))
dat <- data.frame(x = x, y = y)
poisson_model <- glm_model(y ~ x , family = poisson)
negbin_model <- glm_nb_model(y ~ x)
fit(poisson_model, dat)
fit(negbin_model, dat)
fit(list(poisson_model, negbin_model), dat)
fit(list(pm = poisson_model, nm = negbin_model), dat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.