I am new to R , and even if I searched for a solution , I haven't found it yet. I want to call in a loop an plmtest object. I assign the results from Lagrange Multiplier Test - (Breusch-Pagan) in plmtest5 and plmtest6, with the following syntax in R:
for (i in (5:6)) assign(paste("plmtest",i,sep=""),
plmtest(eval(parse(text=paste('pool',i, sep=""))),type=c("bp")))
I want to show the results in a loop. I've tried
for (i in (5:6)) paste("plmtest",i,sep="")
and
for (i in (5:6)) print(paste("plmtest",i,sep=""))
with no results.
The plmtest5
and plmtest6
works, but I want them in a loop.
How it can be done?