SST: Calculate the Total Sum of Squares

Description Usage Arguments Value Examples

Description

Calculate the total sum of squares (SST) by subtracting the mean from each number in the data set, squaring each re-centered observation, and then summing up the results.

Usage

1
SST(input, na.rm = FALSE)

Arguments

input

a vector of numbers

na.rm

true or false for removing NA's before the calculation is performed

Value

A number

Examples

1
2
3
4
5
6
7
8
a <- c(4,12,8,7)
SST(a)

b <- c(4,NA,12,NA,7)
SST(b)

d <- c(4,NA,12,8,NA,7)
SST(d,na.rm=T)

Andy-McCarthy/BasicMath documentation built on May 27, 2019, 7:24 a.m.