Description Usage Arguments Details Value Author(s) Examples
Provide the current available distributions that can be used as an innovation process in a fit of the INAR(p) model.
1 2 3 4 | innovation(dist)
## S3 method for class 'innovation'
print(x, ...)
|
dist |
Character specification of the innovation process, see details. |
x |
An |
... |
Further arguments for other specific methods. |
There are some discrete distributions available for the
innovation process specification. The following table display their
names and their abbreviations to be passed to innovation()
.
Distribution | Abbreviation | Parameters | |
Bernoulli | "BE" | 0 < theta < 1 |
|
BerPoi | "BP" | theta > 0; 0 < phi < 1 |
|
BerG | "BG" | theta, phi > 0 |
|
Geometric | "GE" | theta > 0 |
|
Mean-Parameterized COM-Poisson | "CP" | theta, phi > 0 |
|
Negative Binomial | "NB" | theta, phi > 0 |
|
Poisson | "PO" | theta > 0 |
|
The function innovation()
returns an "innovation"
object
that brings a set of information about the innovation process . More
specifically, returns a list with the following
elements:
d: Probability mass function function(x, par)
.
r: Random generator function function(n, par)
.
par: Describes the parametric space of the distribution.
npar: Number of parameters of the innovation process specified.
constraint: Character; describes the restriction between parameters if any.
disp: Describes the types of dispersion that the distribution can model.
name: Name of the distribution.
The arguments of the returned functions are:
x
Vector of discrete non-negative quantiles.
n
Number of observations to return.
par
Parameter vector of the innovation process.
Rodrigo M. R. Medeiros <rodrigo.matheus@live.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Not run:
### Specification of the Poisson innovation to 'inv' object
inv <- innovation("PO")
### Methods
inv
### Generating observations
x <- inv$r(500, 5)
### Barplot and probability mass function
xaxis <- barplot(prop.table(table(x)), main = inv$name,
xlab = "x", ylab = "Proportion")
points(xaxis, inv$d(sort(unique(x)), 5),
type = "b", pch = 16, col = 2)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.