testTransform
computes likelihood ratio tests for particular values of the power parameter
based on powerTransform
objects.testTransform(object, lambda)
## S3 method for class 'powerTransform':
testTransform(object, lambda=rep(1, dim(object$y)[2]))
estimateTransform
or powerTransform
.powerTransform
is used to estimate a power
transformation for a univariate or multivariate sample or multiple linear
regression problem, using the method of Box and Cox (1964). It is usual to
round the estimates to nearby convenient values, and this function is use to
compulte a likelihood ratio test for values of the transformation parameter
other than the ml estimate.
For one-parameter families of transformations, namely the Box-Cox power family link{bcPower}
and the Yeo-Johnson power family yjPower
, this function computes a test based on twice the difference in the log-likelihood between the maximum likelihood-like estimate and the log-likelihood evaluated at the value of lambda
specified.
For the skew power family, the test is based on the profile loglikelihood maximizing over the location (or start) parameter gamma
. Thus, the start parameter is treated as a nusiance parameter.powerTransform
and skewPower
for examples of the use of this function and other tests that might be of interest in some circumstances.summary(a3 <- powerTransform(cbind(len, ADT, trks, sigs1) ~ hwy, Highway1))
# test lambda = (0 0 0 -1)
testTransform(a3, c(0, 0, 0, -1))
Run the code above in your browser using DataCamp Workspace