[R] loop with variable names

2016-11-04 Thread paolo brunori
du2) lm(y~sex+edu2) lm(y~age+edu+edu2) But I would like to first define a list containing all possible sets of regressors, and then execute each one in a loop/lapply. Unfortunately I got lost in trying to paste variables' name in the formula with no result. many thanks in advance. pa

[R] boot with different sample sizes

2013-03-20 Thread paolo brunori
, 3, 2) test1<-function(x,y,d){ + return(sum(x) - sum(y)) + } b=boot(red blue, test1 ,R=10) Error: unexpected symbol in "b=boot(red blue" -- Paolo Brunori Ricercatore in Economia Politica Dipartimento di Scienze Economiche Via C. Rosalba 53, 70124 Bari tel +39 080 504 90