Dear all,
I would like to use the jackknife with a user written program and use clustering (paneldata). However, my program fails and I am not sure why. With a bootstrap this works fine. Can someone point out my folly?
The output of the program:
I would like to use the jackknife with a user written program and use clustering (paneldata). However, my program fails and I am not sure why. With a bootstrap this works fine. Can someone point out my folly?
Code:
clear all webuse pig gen newid = id xtset newid week cap program drop xtest program define xtest, rclass xtreg weight c.week return scalar coef = r(table)[1,1] end *Test program xtest return list *Jackknife jackknife r(coef), cluster(id) idcluster(newid): xtest
Code:
. jackknife r(coef), cluster(id) idcluster(newid): xtest (running xtest on estimation sample) Jackknife replications (48) 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn insufficient observations to compute jackknife standard errors no results will be saved r(2000);
Comment