cdf_crossval | R Documentation |
This function returns A goodness-of-fit criteria for nonlinear model selection, specifically, the cross-validation correlation coefficient R (R.Cross.val).
cdf_crossval(model, ...)
## S4 method for signature 'missingORNULL'
cdf_crossval(
model,
formula,
pars,
q,
logx = FALSE,
min.val = NULL,
loss.fun = c("linear", "huber", "smooth", "cauchy", "arctg"),
maxiter = 1024,
maxfev = 1e+05,
ptol = 1e-12,
minFactor = 1e-06
)
## S4 method for signature 'nls'
cdf_crossval(
model,
q,
logx = FALSE,
min.val = NULL,
maxiter = 1024,
ptol = 1e-12,
minFactor = 1e-06
)
## S4 method for signature 'CDFmodel'
cdf_crossval(
model,
q,
logx = FALSE,
min.val = NULL,
maxiter = 1024,
ptol = 1e-12,
minFactor = 1e-06
)
## S4 method for signature 'nls.lm'
cdf_crossval(
model,
formula,
q,
logx = FALSE,
min.val = NULL,
maxiter = 1024,
ptol = 1e-12,
minFactor = 1e-06
)
formula |
No required for when a model from class
CDFmodel or |
pars |
Estimated model parameters. |
q |
Objective variable used to build the model, typically called a
vector of quantiles. The model's formula must be expressed in terms of
variable |
logx |
logical(1). If TRUE, then a logarithm transformation will be
applied: |
min.val |
A number denoting the lower bound of the domain where CDF is defined. For example, for Weibull and GGamma min.val = 0. |
loss.fun |
Described in |
maxiter, ptol, maxfev |
Arguments for function
|
minFactor |
A positive numeric value specifying the minimum step-size factor allowed on any step in the iteration. The increment is calculated with a Gauss-Newton algorithm and successively halved until the residual sum of squares has been decreased or until the step-size factor has been reduced below this limit. Default value: 10^-6. |
The cross-validation correlation coefficient R (R.Cross.val) is an estimator of the average cross-validation predictive power (1).
Stevens JP. Applied Multivariate Statistics for the Social Sciences. Fifth Edit. Routledge Academic; 2009.
mcgoftest
for Bootstrap test for Goodness of fit.
## Let's simulate a sample from normal distribution
x1 = rnorm(10000, mean = 1.5, sd = 2) + runif(10^4)
## Let's build a model
cdfp <- fitCDF(x1, distNames = "Normal", plot = F)
## Next, we get an estimation of the cross-validation correlation
## coefficient R (R.Cross.val)
cdf_crossval(model = cdfp$bestfit, q = x1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.