Learn R Programming

qpcR (version 1.4-1)

LOF.test: Formal lack-Of-Fit test of a nonlinear model against a one-way ANOVA model

Description

Tests the nonlinear model against a more general one-way ANOVA model and from a likelihood ratio test. P-values are derived from the F- and \(\chi^2\) distribution, respectively.

Usage

LOF.test(object)

Arguments

object

an object of class 'replist', 'pcrfit' or 'nls', which was fit with replicate response values.

Value

A list with the following components:

pF

the p-value from the F-test against the one-way ANOVA model.

pLR

the p-value from the likelihood ratio test against the one-way ANOVA model.

Details

The one-way ANOVA model is constructed from the data component of the nonlinear model by factorizing each of the predictor values. Hence, the nonlinear model becomes a submodel of the one-way ANOVA model and we test both models with the null hypothesis that the ANOVA model can be simplified to the nonlinear model (Lack-of-fit test). This is done by two approaches:

1) an F-test (Bates & Watts, 1988). 2) a likelihood ratio test (Huet et al, 2004).

P-values are derived from an F-distribution (1) and a \(\chi^2\) distribution (2).

References

Nonlinear Regression Analysis and its Applications. Bates DM & Watts DG. John Wiley & Sons (1988), New York.

Statistical Tools for Nonlinear Regression: A Practical Guide with S-PLUS and R Examples. Huet S, Bouvier A, Poursat MA & Jolivet E. Springer Verlag (2004), New York, 2nd Ed.

Examples

Run this code
# NOT RUN {
## Example with a 'replist'
## no lack-of-fit.
ml1 <- modlist(reps, fluo = 2:5, model = l5)
rl1 <- replist(ml1, group = c(1, 1, 1, 1))
LOF.test(rl1)

## Example with a 'nls' fit
## => there is a lack-of-fit.
DNase1 <- subset(DNase, Run == 1)
fm1DNase1 <- nls(density ~ SSlogis(log(conc), Asym, xmid, scal), DNase1) 
LOF.test(fm1DNase1)
# }

Run the code above in your browser using DataLab