Description Usage Arguments Details Value Author(s) Examples
Fits a function to each element of a list of data.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
Xstar |
List.
A list of length |
fitFUN |
Function.
Fit function to be applied to each element of |
... |
Argument to pass to |
par |
Logical.
If |
ncores |
Integer.
Number of cores to use if |
mc |
Logical.
If |
lb |
Logical.
If |
cl_eval |
Logical.
Execute |
cl_export |
Logical.
Execute |
cl_expr |
Expression.
Expression passed to |
cl_vars |
Character vector.
Names of objects to pass to |
rbind |
NULL or logical.
If |
The first argument of fitFUN
should be data
The output of fitFUN
should be a vector.
Options for explicit parallelism are provided.
See par
and suceeding arguments.
Returns a list of parameter estimates.
Ivan Jacob Agaloos Pesigan
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | xstar <- univ(n = 100, rFUN = rnorm, mean = 100, sd = sqrt(225), R = 100)
thetahatstar <- fit(Xstar = xstar, fitFUN = mean, rbind = TRUE)
mean(thetahatstar)
Xstar <- mvn(
n = 100,
Sigma = matrix(c(1, .5, .5, 1), nrow = 2),
R = 100
)
foo <- function(X) {
as.vector(cov(X))
}
thetahatstar <- fit(Xstar = Xstar, fitFUN = foo, rbind = TRUE)
thetahatstar <- thetahatstar[, 2]
mean(thetahatstar)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.