Learn R Programming

rAverage (version 0.3-2)

rav.indexes: Fit indexes for an averaging model

Description

This function returns the infexes of fit for an averaging model given the parameters s0, w0, s(k,j), and w(k,j).

Usage

rav.indexes(param, lev, data, subset=NULL,
    I0=FALSE, 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 furthe
subset
Character, numeric or factor attribute that selects a subset of experimental data for the analysis (see the examples).
I0
Logical. If set FALSE, the s0 and w0 parameters are forced to be zero. If set TRUE, the s0 and w0 parameters are free to be estimated.
names
Vector of character strings containing the names of the factors.
title
Character. Puts a title on the output.

Value

  • An object of class "indexes".

Details

Returns the principal indexes of fit (AIC, BIC, R squared, Adjusted R squared).

See Also

averaging, pargen, rav, rAverage-package, rav.cmd

Examples

Run this code
# 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)
# par <- c(0,0, s, w)
# Estimated model by rav:
# fit1 <- rav(fmdata1, lev=c(3,3))
# Fitted model by original parameters:
# fit2 <- rav.indexes(param=par, lev=c(3,3), data=fmdata1)

Run the code above in your browser using DataLab