Learn R Programming

CLME (version 1.0-1)

pava.functions: Apply PAVA Order Constraints

Description

Implements a Pool Adjacent Violators Algorithm (PAVA).

Usage

pava.simple.order(theta, cov.theta=diag(length(theta)) , node = NULL,
                  decreasing = FALSE , hp = FALSE)
pava.simple.tree(theta, cov.theta=diag(length(theta)), node = 1,
                 decreasing = FALSE , hp = FALSE )
pava.umbrella(theta,cov.theta=diag(length(theta)), node = 1, 
              decreasing = FALSE , hp = FALSE )

Arguments

theta
$p_1 \times 1$ vector on which to apply PAVA order constraints.
cov.theta
covariance matrix of $\theta$
node
node element. Set to NULL for simple order.
decreasing
logical indicating whether the initial order constraint is increasing or decreasing.
hp
logical indicating whether to use the full covariance matrix (TRUE) or just the diagonal elements (FALSE).

Value

  • The function returns a $p_1 \times 1$ vector of order-restricted estimates of theta.

Details

Refer to create.constraints or constrained.lme for more information on arguments node and decreasing.

Examples

Run this code
test.pava <- c(4,2,7,5,9)
wts       <- diag(length(test.pava))

pava.simple.order( test.pava , wts, NULL, FALSE, FALSE)
pava.simple.tree(  test.pava , wts, 3   , TRUE , FALSE)
pava.umbrella(     test.pava , wts, 2   , TRUE , FALSE)

Run the code above in your browser using DataLab