wmse: wMSE

Description Usage Arguments Value References

Description

Function for weighting MSE, nMSE, or aMSE by the specified variable for weights.

Usage

1
2
wmse(observed = "observed", predicted = "pred", id.var = "id",
  weight.var = "weights", type = "nmse", data)

Arguments

observed

observed growth values (e.g. height or weight)

predicted

predicted values from models fitted to observed data

id.var

variable that identifies individual subjects

weight.var

Variable used to weight MSE or nMSE. This should be a vector of values that will be used to divide subject-specific MSE estimates by. An example could be using subject-specific growth trajectories (i.e. weighting individuals with slowest growth).

type

Type of MSE estimate used as denominator. Default is nMSE but can be se to standard MSE.

Value

data.frame with id and subject-specific weighted MSE or nMSE estimates

References

Grigsby MR, Di J, Leroux A, Zipunnikov V, Xiao L, Crainiceanu C, Checkley W. Novel metrics for growth model selection. Emerging themes in epidemiology. 2018 Feb;15(1):4.


MatthewGrigsby/growthmetrics documentation built on May 25, 2019, 8:29 p.m.