Description Usage Arguments Value See Also Examples
Function to run the discrimination test between beta and bessel regressions (DBB).
1 2 3 4 5 6 7 8 9 10 | dbbtest.fit(
z,
x,
v = NULL,
link.mean,
link.precision,
em_controls = list(maxit = 5000, em_tol = 10^(-5)),
optim_method = "L-BFGS-B",
optim_controls = list()
)
|
z |
vector of response variables with length |
x |
matrix of covariates with respect to the mean with dimension |
v |
matrix of covariates with respect to the precision parameter. The default is |
link.mean |
a string containing the link function for the mean. The possible link functions for the mean are "logit","probit", "cauchit", "cloglog". |
link.precision |
a string containing the link function the precision parameter. The possible link functions for the precision parameter are "identity", "log", "sqrt". |
em_controls |
a list containing two elements: |
optim_method |
main optimization algorithm to be used. The available methods are the same as those of |
optim_controls |
a list of control arguments to be passed to the |
Object of class dbbtest, which is a list containing two elements. The 1st one is a table of terms considered in the decision rule of the test; they are sum(z2/n) = sum_i=1^n(z_i^2)/n, sum(quasi_mu) = sum_i=1^n(tildemu_i^2 + tildemu_i(1-tildemu_i)/2) |D_bessel| and |D_beta| as indicated in the main reference. The 2nd term of the list is the name of the selected model (bessel or beta).
simdata_bes
, dbbtest
, simdata_bet
1 2 3 4 5 6 7 8 9 10 | # Illustration using the Weather task data set available in the bbreg package.
n <- 100
x <- cbind(rbinom(n, 1, 0.5), runif(n, -1, 1))
v <- runif(n, -1, 1)
z <- simdata_bes(
kap = c(1, -1, 0.5), lam = c(0.5, -0.5), x, v,
repetition = 1, link.mean = "logit", link.precision = "log"
)
z <- unlist(z)
dbbtest.fit(z = z, x = x ,v = v, link.mean = "logit", link.precision = "identity")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.