rav.indices {rAverage} | R Documentation |
Fit indices for averaging models
Description
The function fit.indices
returns the fit indices for the averaging model given the parameters
s0
, w0
, s(k,j)
, and w(k,j)
.
Usage
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
|
lev |
Vector containing the number of levels of each factor. For instance, two factors with
respectively 3 and 4 levels require |
data |
A |
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 |
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.
Value
An object of class "indices"
.
See Also
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)