1 | sterby3(x0, y, const, estim)
|
x0 |
|
y |
|
const |
|
estim |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (x0, y, const, estim)
{
n = nrow(x0)
p = ncol(x0) + 1
z = cbind(matrix(1, nrow = n), x0)
argum = z %*% estim
matM = matrix(data = 0, nrow = p, ncol = p)
IFsquar = matrix(data = 0, nrow = p, ncol = p)
for (i in 1:n) {
myscalar = as.numeric(der2phiBY3(argum[i], y[i], const))
matM = matM + myscalar * (z[i, ] %*% t(z[i, ]))
IFsquar = IFsquar + myscalar^2 * (z[i, ] %*% t(z[i, ]))
}
matM = matM/n
matMinv = solve(matM)
IFsquar = IFsquar/n
asvBY = matMinv %*% IFsquar %*% t(matMinv)
sqrt(diag(asvBY))/sqrt(n)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.