| check_observations | R Documentation |
Check whether there are sufficient observations to run a model
check_observations(x, ...)
## S3 method for class 'data.frame'
check_observations(
x,
model,
count_col = "count",
year_col = "year",
month_col = NULL,
covars = character(0),
changepoints = numeric(0),
eps = 1e-08,
...
)
## S3 method for class 'trimcommand'
check_observations(x, ...)
## S3 method for class 'character'
check_observations(x, ...)
x |
A |
... |
Parameters passed to other methods. |
model |
|
count_col |
|
year_col |
|
month_col |
|
covars |
|
changepoints |
|
eps |
|
A list with two components. The component sufficient takes the value
TRUE or FALSE depending on whether sufficient counts have been found.
The component errors is a list, of which the structure depends on the chosen model,
that indicates under what conditions insufficient data is present to estimate the model.
For model 3 without covariates, $errors is a list whose single element is a vector of time
points with insufficient counts.
For model 3 with covariates, $errors is a named list with an element for each covariate
for which insufficients counts are encountered. Each element is a two-column data.frame. The
first column indicates the time point, the second column indicates for which covariate value insufficient
counts are found.
For Model 2, without covariates $errors is a list with a single
element changepoints. It points out what changepoints lead to a time
slice with zero observations.
For Model 2, with covariates $errors is a named list with an
element for each covariate for which inssufficients counts are encountered.
Each element is a two-column data.frame, The first colum indicates the
changepoint, the second column indicates for which covariate value
insufficient counts are found.
Other modelspec:
read_tcf(),
read_tdf(),
set_trim_verbose(),
trim(),
trimcommand()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.