residuals: Extract residuals from a twoway object

Description Usage Arguments Value Examples

Description

Extract residuals from a twoway object

Extract fitted values from a twoway object

Usage

1
2
3
4
5
## S3 method for class 'twoway'
residuals(object, nonadd = FALSE, ...)

## S3 method for class 'twoway'
fitted(object, nonadd = FALSE, ...)

Arguments

object

A class="twoway" object

nonadd

If TRUE, the 1 degree of freedom term for non-additivity is subtracted from the additive residuals

...

other arguments (unused)

Value

A numeric matrix of residuals corresponding to the data supplied to twoway

A numeric matrix of fitted values corresponding to the data supplied to twoway

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(taskRT)
task.2way <- twoway(taskRT)
residuals(task.2way)
residuals(task.2way, nonadd=TRUE)

sum(residuals(task.2way)^2)               #  SSE for additive model
sum(residuals(task.2way, nonadd=TRUE)^2)  # SSPE, non-additive model
data(taskRT)
task.2way <- twoway(taskRT)
fitted(task.2way)
fitted(task.2way, nonadd=TRUE)

twoway documentation built on July 1, 2020, 5:37 p.m.

Related to residuals in twoway...