BoxCox.uniformity: BoxCox.uniformity

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Returns a Chi-square statistic for the uniformity of the distribution of Age data points after a Box-Cox transformation with a chosen lambda

Usage

1
  BoxCox.uniformity(lambda, covariate)

Arguments

lambda

numeric value used in the Box-Cox transform

covariate

numeric vector usually of sample age values which will be transformed

Details

Function to calculate the Chi square statistic after transforming the distribution of covariate values by a given lambda and. The total number of bins used in the initial counting process is floor(sqrt(length(covariate))) There should probably be a warning thrown if the number of data points entered is too few to be meaningful.

Value

a single Chi-square statistic for the distributional uniformity of the transformed data set

Author(s)

Alexander D. Rowe

See Also

cov.transform.age

Examples

1
plot(seq(-1,2,0.1), mapply(lambda=seq(-1,2,0.1), BoxCox.uniformity, MoreArgs = list(covariate = rexp(1000,1)) ))

adrowe1/devclir documentation built on May 10, 2019, 5:59 a.m.