one_box.Rd
Create a time series of decline data
one_box(x, ini, ..., t_end = 100, res = 0.01) # S3 method for numeric one_box(x, ini = 1, ..., t_end = 100, res = 0.01) # S3 method for character one_box(x, ini = 1, parms, ..., t_end = 100, res = 0.01) # S3 method for mkinfit one_box(x, ini = "model", ..., t_end = 100, res = 0.01)
x | When numeric, this is the half-life to be used for an exponential
decline. When a character string specifying a parent decline model is given
e.g. |
---|---|
ini | The initial amount. If x is an |
... | Further arguments passed to methods |
t_end | End of the time series |
res | Resolution of the time series |
parms | A named numeric vector containing the model parameters |
An object of class one_box
, inheriting from ts
.
# Use a fitted mkinfit model require(mkin) fit <- mkinfit("FOMC", FOCUS_2006_C, quiet = TRUE) pred_1 <- one_box(fit) plot(pred_1)# Use a model with more than one observed variable m_2 <- mkinmod(parent = mkinsub("SFO", "m1"), m1 = mkinsub("SFO"))#>#> Warning: Observations with value of zero were removed from the data