Creates an m_estimation_basis object

create_basis(estFUN, data, units, outer_args, inner_args)

Arguments

estFUN

a function that takes in group-level data and returns a function that takes parameters as its first argument

data

a data.frame

units

an optional character string identifying the grouping variable in data

outer_args

a list of arguments passed to the outer (data) function of estFUN. (optional)

inner_args

a list of arguments passed to the inner (theta) function of estFUN. (optional)

Details

Either data or split_data must be provided

Examples

myee <- function(data){
   function(theta){
    c(data$Y1 - theta[1],
     (data$Y1 - theta[1])^2 - theta[2])
   }
 }
mybasis <- create_basis(
   estFUN = myee,
   data   = geexex)