analyseNlsResiduals: This function evaluates residuals from 'nls' model objects....

View source: R/analyseNlsResiduals.R

analyseNlsResidualsR Documentation

This function evaluates residuals from 'nls' model objects. It returns a normality plot, residuals vs. fitted, and a lag-plot with a trend line (lm(residual ~ residual -1)) to evaluate autocorrelation. It also provides a Shapiro-Wilk normality test, Levene test for homogeneity of variance, a Runs test for randomness, and a t-test for mean zero.

Description

This function evaluates residuals from 'nls' model objects. It returns a normality plot, residuals vs. fitted, and a lag-plot with a trend line (lm(residual ~ residual -1)) to evaluate autocorrelation. It also provides a Shapiro-Wilk normality test, Levene test for homogeneity of variance, a Runs test for randomness, and a t-test for mean zero.

Usage

analyseNlsResiduals(nls)

Arguments

nls

an object of class 'nls'

Value

Residual plots: normality, residuals vs. fitted data, autocorrelation (lagged residuals vs. residuals with fitted linear model).

Residual tests: Mean zero, Shapiro-Wilk normality test, Levene Test for homogeneity of variance, and Run's test for randomness


earlycapistran/consLettersUtils documentation built on Nov. 22, 2022, 1:22 a.m.