This score is calculated on the basis of Peak test, which is used for checking for homoscedasticity of residuals in regression analyses.

scorePeak(object, variable = NULL)

Arguments

object

Object An object of class modelAudit or modelResidual.

variable

Name of model variable to order residuals. If value is NULL data order is taken. If value is "Predicted response" or "Fitted values" then data is ordered by fitted values. If value is "Observed response" the data is ordered by a vector of actual response (y parameter passed to the audit function).

Value

an object of class scoreAudit

Examples

library(car) lm_model <- lm(prestige~education + women + income, data = Prestige) lm_au <- audit(lm_model, data = Prestige, y = Prestige$prestige) scorePeak(lm_au)
#> $name #> [1] "Peak" #> #> $score #> [1] 0.009803922 #> #> attr(,"class") #> [1] "scoreAudit"