create_GFUN | R Documentation |
From a list of ψ(O_i, θ) for i = 1, ..., m,
creates G_m = ∑_i ψ(O_i, θ),
called GFUN
. Here, ψ(O_i, θ) is the
*inner* part of an estFUN
, in that the data is fixed and G_m
is a function of θ.
create_GFUN(object, ...) ## S4 method for signature 'm_estimation_basis' create_GFUN(object)
object |
an object of class |
... |
additional arguments passed to other methods |
a function
myee <- function(data){ function(theta){ c(data$Y1 - theta[1], (data$Y1 - theta[1])^2 - theta[2]) } } mybasis <- create_basis( estFUN = myee, data = geexex) f <- grab_GFUN(create_GFUN(mybasis)) # Evaluate GFUN at mean and variance: should be close to zero n <- nrow(geexex) f(c(mean(geexex$Y1), var(geexex$Y1) * (n - 1)/n))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.