fbvlog(x, start, ..., nsloc1 = NULL, nsloc2 = NULL, std.err = TRUE,
corr = FALSE, method = "BFGS", warn.inf = TRUE)
fbvalog(x, start, ..., nsloc1 = NULL, nsloc2 = NULL, std.err = TRUE,
corr = FALSE, method = "BFGS", warn.inf = TRUE)
fbvhr(x, start, ..., nsloc1 = NULL, nsloc2 = NULL, std.err = TRUE,
corr = FALSE, method = "BFGS", warn.inf = TRUE)
fbvneglog(x, start, ..., nsloc1 = NULL, nsloc2 = NULL, std.err = TRUE,
corr = FALSE, method = "BFGS", warn.inf = TRUE)
fbvaneglog(x, start, ..., nsloc1 = NULL, nsloc2 = NULL, std.err = TRUE,
corr = FALSE, method = "BFGS", warn.inf = TRUE)
fbvbilog(x, start, ..., nsloc1 = NULL, nsloc2 = NULL, std.err = TRUE,
corr = FALSE, method = "BFGS", warn.inf = TRUE)
fbvnegbilog(x, start, ..., nsloc1 = NULL, nsloc2 = NULL, std.err = TRUE,
corr = FALSE, method = "BFGS", warn.inf = TRUE)
fbvct(x, start, ..., nsloc1 = NULL, nsloc2 = NULL, std.err = TRUE,
corr = FALSE, method = "BFGS", warn.inf = TRUE)
start
is omitted the routine attempts to find good
starting values using marginal maximum likelihood estimators.optim
. If parameters of the distribution are included they
will be held fixed (see Details).x
, for linear modelling of the location
parameter on the first/second margin (see Details).
The data frames are treated as covariate matrices, excluding the
intercept.
A TRUE
(the default), the ``standard
errors'' are returned.TRUE
, the ``correlation matrix'' is
returned.optim
for
details).TRUE
(the default), a warning is
given if the negative log-likelihood is infinite when evaluated at
the starting values.c("bvevd","evd")
. The generic accessor functions fitted
(or
fitted.values
), std.errors
and
deviance
extract various features of the returned
object.
The functions profile
and profile2d
can be
used to obtain deviance profiles.
The function anova
compares nested models.
The function plot
produces diagnostic plots.
An object of class c("bvevd","evd")
is a list containing
the following components
optim
.x
.nsloc1
and nsloc2
.x
. For stationary fitting, the named components of start
can be
any of dep
, asy
(a vector of length two), alpha
,
beta
, mar1
(a vector of length three) and mar2
(a vector of length three).
Alternatively, mar1
can be passed as three separate arguments;
loc1
, scale1
and shape1
.
mar2
can be similarly passed as three separate arguments;
loc2
, scale2
and shape2
.
The asymmetry parameters for the asymmetric logistic and negative
asymmetric logistic models can also be passed separately as
asy1
and asy2
.
Associating a separate name with each parameter allows any parameter
subset to be fixed at specified values.
All parameters to be fixed must be passed individually (e.g. to fix
the parameters on the first margin all of loc1
, scale1
and shape1
must be specified; using mar1
to specify all
three simultaneously results in an error).
For non-stationary fitting, the non-stationary parameters on the
first margin can be passed (either in start
or as fixed values)
using the column names of the data frame nsloc1
with the prefix
``loc1''. The intercept of the linear model can be passed as
loc1
. If nsloc1
is a vector it is converted into
a one column data frame with column name ``trend'', so
that the associated parameter can be passed as loc1trend
.
Parameters on the second margin can be passed similarly.
For non-stationary fitting it is recommended that the covariates within the linear models for the location parameters are (at least approximately) centered and scaled, particularly if automatic starting values are used, since the starting values for all the associated parameters are taken to be zero.
anova.evd
, optim
,
plot.bvevd
, profile.evd
,
profile2d.evd
bvdata <- rbvlog(100, dep = 0.6, mar1 = c(1.2,1.4,0.4),
mar2 = c(1.2,1.4,0.4))
M1 <- fbvlog(bvdata)
M2 <- fbvlog(bvdata, dep = 0.75)
anova(M1, M2)
plot(M1)
plot(M1, mar = 1)
plot(M1, mar = 2)
plot(M2)
M1P <- profile(M1, which = "dep")
plot(M1P)
trend <- (-49:50)/100
rnd <- runif(100, min = -.5, max = .5)
fbvlog(bvdata, nsloc1 = trend)
fbvlog(bvdata, nsloc1 = trend, nsloc2 = data.frame(trend = trend,
random = rnd))
fbvlog(bvdata, nsloc1 = trend, nsloc2 = data.frame(trend = trend,
random = rnd), loc2random = 0)
Run the code above in your browser using DataLab