ch.reducedChiSq: A function calculate the reduced Chi Square from a model fit

View source: R/ch.reducedChiSq.r

ch.reducedChiSqR Documentation

A function calculate the reduced Chi Square from a model fit

Description

This function calculates the reduced Chi Square from a from a model fit. The empirical Y, y variance, and the fit Y, as well as the number of free parameters are input.

Usage

ch.reducedChiSq(y, yFit, yVar, numParameters)

Arguments

y

A numeric vector containing the empirical Y from the data.

yFit

A numeric vector containing the fit Y from the model.

yVar

A numeric vector containing the variance of each row in the Y vector.

numParameters

The number of free parameters. '

Value

a list containing the number of observations (n); the degrees of freedom (df), the chi square statistic (chiSq), the p value associated with the chi square and df, and the reduced chi square.

Examples

ch.reducedChiSq (myY, fitY, yVaraince, 5)

ccpluncw/ccpl_R_chutils documentation built on Feb. 28, 2024, 1:17 a.m.