I am trying to generate a confidence interval for the statistic arpt (at risk of poverty threshold generated with the package leaken) using the package boot. This is my temptative script (where XH090 and DB030 and w are variables of an attached dataframe): > arpt.boot <- function(data,i){ > d = data[i] > arpt <- arpr(d, sort=DB030, p=c(0.4)) > arpt <- as.vector(arpt) > } > arpt40 <- boot(HX090,arpt.boot,R=1000,weights=w) > boot.ci(arpt40, conf = 0.95, type = "norm")
R answer with the following error message: > Error in boot(dati_mauro$HX090, arpt.boot, R = 1000, weights = > dati_mauro$w) : incorrect number of subscripts on matrix Thank you in advance for any help in solving this problem. Benedetto Rocchi -- Dipartimento di Scienze per l'Economia e l'Impresa Universit� degli Studi di Firenze Via delle Pandette, 9 50127 Firenze telefono 0552759706 cellulare 3204309360 [[alternative HTML version deleted]]
______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.