[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Jackknife command with the cluster option
I am using the bootstrap command to calculate bootstrap confidence
intervals using a dataset that is clustered with my own command. I
therefore wish to sample the clusters with replacement. I have done this
using bootstrap's cluster and idcluster options.
In order for bootstrap to calculate BCa confidence intervals, the
user-written command which bootstrap calls must also work with the
For a command to work with jackknife, the user-written command must
handle the if expression, in order for observations to be left out. In
the case where the cluster option is given to jackknife (or bootstrap
with bca), the contents of the `if' macro parsed to my user-written
command seems to contain 1 on the first call to my command (with full
data) and 0 on subsequent calls.
I would have expected that if the cluster(cl_id) idcluster(new_id)
options are given to jackknife, the `if' macro ought to contain
something like "if new_id!=k", where k runs from 1 to the number of
clusters. However it doesn't seem to do this. Can anybody offer any
guidance as to how a user-written command is supposed to know which
cluster to ignore in the dataset when being called by jackknife?
* For searches and help try: