Description Usage Arguments Details Value Author(s) Examples
Implementing the jackknife method of estimating standard errors of some linear statistics
1 |
vx |
a vector of observations |
tfunc |
the function which takes the rho argument and returns the statistic |
dfunc |
the delta function which takes a tuple or window of the observations and returns a vector of deltas |
im |
the tuple or window size |
vw |
the weights for deleting or downweighting the blocks |
... |
other arguments for both |
The function takes several arguments including functions and returns a list containing the results.
a list containing the results
The object is a list containing the following components:
T |
the value of the statistic |
jack |
a vector or matrix containing the jackknifed statistics |
sig2 |
the jackknifed estimate of the variance of the statistic |
Yukai Yang, yukai.yang@statistik.uu.se
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | vw1 = 1
vw2 = c(0.25,0.75,1,0.75,0.25)
# the AR(1) model
iN = 100
vx <- rnorm(iN)
# for first order autocorrelation
# dfunc vec 2, y_t and y_t-1
dfunc <- function(yy, my, vy) return(prod(yy - my)/vy)
tfunc <- function(rho, my, vy) return(rho)
# results
ret = jackknife(as.vector(vx), tfunc, dfunc, im=2, vw=vw1, my=mean(vx), vy=var(vx))
ret
ret = jackknife(as.vector(vx), tfunc, dfunc, im=2, vw=vw2, my=mean(vx), vy=var(vx))
ret
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.