Creates the estimating function (\(\psi(O_i, \theta)\))
for each unit. That is, this function evaluates the outer function in
estFUN
for each independent unit and a returns the inner function in
estFUN
.
create_psiFUN_list(object, ...)
# S4 method for m_estimation_basis
create_psiFUN_list(object)
an object of class m_estimation_basis
additional arguments passed to other methods
the object
with the .psiFUN_list
slot populated.
myee <- function(data){
function(theta){
c(data$Y1 - theta[1],
(data$Y1 - theta[1])^2 - theta[2])
}
}
mybasis <- create_basis(
estFUN = myee,
data = geexex)
psi_list <- grab_psiFUN_list(create_psiFUN_list(mybasis))
# A list of functions
head(psi_list)
#> $`1`
#> function(theta){
#> c(data$Y1 - theta[1],
#> (data$Y1 - theta[1])^2 - theta[2])
#> }
#> <environment: 0x7fea50a48eb0>
#>
#> $`2`
#> function(theta){
#> c(data$Y1 - theta[1],
#> (data$Y1 - theta[1])^2 - theta[2])
#> }
#> <environment: 0x7fea50a4bd20>
#>
#> $`3`
#> function(theta){
#> c(data$Y1 - theta[1],
#> (data$Y1 - theta[1])^2 - theta[2])
#> }
#> <environment: 0x7fea50a4eb90>
#>
#> $`4`
#> function(theta){
#> c(data$Y1 - theta[1],
#> (data$Y1 - theta[1])^2 - theta[2])
#> }
#> <environment: 0x7fea50a4daf0>
#>
#> $`5`
#> function(theta){
#> c(data$Y1 - theta[1],
#> (data$Y1 - theta[1])^2 - theta[2])
#> }
#> <environment: 0x7fea50a50960>
#>
#> $`6`
#> function(theta){
#> c(data$Y1 - theta[1],
#> (data$Y1 - theta[1])^2 - theta[2])
#> }
#> <environment: 0x7fea50a4f888>
#>