Score based on Runs test statistic. Note that this test is not very strong. It utilizes only signs of the residuals. The score value is helpful in comparing models. It is worth pointing out that results of tests like p-value makes sense only when the test assumptions are satisfied. Otherwise test statistic may be considered as a score.

scoreRuns(object, variable = NULL)

## Arguments

object object An object of class ModelAudit. 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).

## Examples

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