Creates an m_estimation_basis object
create_basis(estFUN, data, units, outer_args, inner_args)
a function that takes in group-level data and returns a function that takes parameters as its first argument
a data.frame
an optional character string identifying the grouping variable in data
a list of arguments passed to the outer (data) function of estFUN
. (optional)
a list of arguments passed to the inner (theta) function of estFUN
. (optional)
Either data
or split_data
must be provided
myee <- function(data){
function(theta){
c(data$Y1 - theta[1],
(data$Y1 - theta[1])^2 - theta[2])
}
}
mybasis <- create_basis(
estFUN = myee,
data = geexex)