genWeight {ivmte} | R Documentation |
Generating list of target weight functions
Description
This function takes in the user-defined target weight functions and the data set, and generates the weight functions for each observation.
Usage
genWeight(fun, fun.name, uname, data)
Arguments
fun |
custom weight function defined by the user. Arguments of the weight function must only be names of variables entering into the function, and can include the unobserved variable. |
fun.name |
string, name of function. |
uname |
the name assigned to the unobserved variable entering into the MTR. |
data |
a named vector containing the values of the variables defining the 'fun', excluding the value of the unobservable (generated from applying split() to a data.frame). |
Value
The weight function 'fun', where all arguments other than that of the unobserved variable are fixed according to the vector 'data'.
[Package ivmte version 1.4.0 Index]