tcG.fit | R Documentation |
This function allows fitting 4 meta-Gaussian models. The data should only contain positive values and have a discrete component in zero.
tcG.fit(
y,
name,
init,
ym = 0,
step = 0,
plots = TRUE,
bootstrap = TRUE,
R = 500,
filename = NULL,
ncpus = parallel::detectCores(),
ym.param = FALSE
)
y |
vector of data |
name |
name of the anamorphosis that will be fitted, a subset of |
init |
initialisation parameters, a list named with the |
ym |
minimal value that can be observed |
step |
discretization step |
plots |
boolean, should plots be drawn? |
bootstrap |
boolean, should boostrap replicates be fitted? |
R |
number of bootstrap replicates |
filename |
if you want to save the plots, a character for your file's name |
ncpus |
number of cores |
ym.param |
boolean, should |
A meta-Gaussian model is a variable Y
defined as
Y = 0 *
I
_{X<0} + \psi(X) *
I
_{X\ge0}
with X~N(\mu,1)
and where I
is the indicator function, equals to 1 if the condition is true and 0 else.
The available fun are the following:
"gp"
for GP meta-Gaussian as in \insertCiteboutigny2021modelling;textualtcG:
\psi(x) = ym+ \sigma x^(1/\alpha) exp(\xi x^2/2)
"power"
as in \insertCitebardossy1992space;textualtcG: \psi(x) = ym + \sigma x^(1/\alpha)
"power-exp"
as in \insertCiteallard2015disaggregating;textualtcG: \psi(x) = ym + \sigma1 (exp(\sigma2 * x^(1/\alpha))-1)
"quadratic-power"
as in \insertCiteallcroft2003latent;textualtcG: \psi(x) = ym + \sigma1 * x^(1/\alpha) + \sigma2 * x^(2/\alpha)
A list of four elements containing the results of the fitted model(s).
The first three elements are lists named by the fitted model(s) (argument name
).
par
gives the fitted parameters.
AIC
gives the Akaike criterion.
fit.boot
gives the parameters fitted with the bootstrap replicates.
Finally for.plots
is a list that is used by the function res.plot
.
## Not run:
data(rain, package = "ismev")
# The histogram is not very revelant due to the fact \code{rain} are daily observations
res=tcG.fit(rain, name=c("power", "gp"),
init=list("power"=c(0,2,2), "gp"=c(0,2,0.5,0.5)),
ym=0.3, step=0.1, R=50)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.