This function calculates the tranformation of difficulty estimates in the logit to a scale with fixed left and right anchors, and returns the transformed difficulty estimates.

set_anchor(difficulty, items = c("gtogmd001", "gtogmd026"), values = c(20, 40))

Arguments

difficulty

Named numerical vector with difficulty estimates of the items, in the logit scale.

items

Character vector of length two with the names of the left and right anchor item. The default is c("gtogmd001", "gtogmd026"), which corresponds to the items: "Lifts head in prone 45 degrees" and "Moves from lying to sitting"

values

Numeric vector of length two with the labels of left and right anchor item. The default is (20, 40).

Value

A vector with length(beta) elements with transformed difficulty estimate

Details

This function scales the difficulty levels by a linear transformation such that the difficulty levels of the two anchor items are set to fixed values. The default setting produces the scale recommended in Van Buuren (2014).

References

van Buuren S (2014). Growth charts of human development. Statistical Methods in Medical Research, 23(4), 346-368.

Author

Stef van Buuren, 2016

Examples

difficulty <- c(-1.5, 0, -0.4, 0.8, 1.2)
names(difficulty) <- paste0("item", 1:5)
set_anchor(difficulty, items = c("item2", "item4"))
#> item1 item2 item3 item4 item5 
#> -17.5  20.0  10.0  40.0  50.0