rav.indices function

Fit indices for averaging models

Fit indices for averaging models

The function fit.indices returns the fit indices for the averaging model given the parameters s0, w0, s(k,j), and w(k,j).

rav.indices(param, lev, data, t.par = FALSE, subset = NULL, n.pars = NULL, names = NULL, title = NULL)

Arguments

  • param: Numerical vector containing the parameters for the function, with the order s0, w0, s(k,j), and w(k,j).
  • lev: Vector containing the number of levels of each factor. For instance, two factors with respectively 3 and 4 levels require lev = c(3,4).
  • data: A matrix or a data.frame object containing the experimental data. Each column corresponds to an experimental design (in order: one-way design, two-way design, ..., full factorial design; see the example for further details). WARNING: previous versions needed a first column filled with the initial state values (s0*w0) or NA values. This is no longer valid. Nevertheless, the first column can be used to label the data (see the attribute subset).
  • t.par: Specifies whether the weight parameters should be the in 't' form or in the 'w' form.
  • subset: Character, numeric or factor attribute that selects a subset of experimental data for the analysis (see the examples).
  • n.pars: Number of parameters of the model. If NULL, n.pars will be calculated from the function.
  • names: Vector of character strings containing the names of the factors.
  • title: Character specifying a title for the output.

Details

Returns the main fit indices (AIC, BIC, R-squared, Adjusted R-squared), the estimated parameters, the fitted values and the residuals of an averaging model.

Returns

An object of class "indices".

See Also

rav, rAverage-package

Examples

## Not run: data(fmdata1) s <- c(12.9, 1.5, 18.3, 5.2, 5.0, 2.3) w <- c(1.4, 0.3, 0.5, 1.6, 1.7, 1.7) param <- c(NA,NA, s, w) # Estimated model by rav: fit1 <- rav(fmdata1, lev=c(3,3)) ; fit1 # Fitted model by original parameters: fit2 <- rav.indices(param=param, lev=c(3,3), data=fmdata1) ; fit2 ## End(Not run)
  • Maintainer: Davide Massidda
  • License: GPL (>= 2)
  • Last published: 2017-07-29

Useful links