Helper function to Transform PVs onto a new metric (e.g., PISA Mean = 500, SD = 100). Uses the method described in the PISA 2012 technical manual.
transformPvs(x, mT = 0, sdT = 1, weights, data, addToDf = FALSE, debug = TRUE)
a List of transofrmed PVs with as many elements as PVs were listed in 'x'.
A concatenated vector of varnames in data, PV1, PV2, ..., PVm.
The desired mean of the PVs
The desired sd of the PVs
The name of the weight variable in 'data' used to caulculate the mean and SD accross the PVs
The data frame that contains the PVs and weights.
A Boolean, if TRUE, the transformed PVs are coerced into the DF, data, with name data$x_T (not yet implmented).
A temporary flag to spit-out objects to global env for chekcing. Will be removed when pushed to CRAN