R 3.1.0 / RStudio 0.98.507 / OpenSUSE Linux 13.1

I'm having difficulties getting -par(mfrow=c(r,c))- to work as it should
after running bootstrapped regression models using -boot-. An example
(tested):

test=data.frame(A=rnorm(500, mean=2.72, sd=5.36),
B=sample(c(12,20,24,28,32),size=500,prob=c(0.333,0.026,0.026,0.436,0.179),replace=TRUE),
C=sample(c(0,1),size=500,prob=c(0.5,0.5),replace=TRUE),D=sample(c(0,1),size=500,prob=c(0.564,0.436),replace=TRUE))
library(boot)
bs=function(formula, data, indices) {
 test=data[indices,]
 fit=lm(formula, data=test)
 return(coef(fit))
}
results=boot(data=test, statistic=bs, R=10000, formula=A~B+C+D+C*D)
results

When I run

par(mfrow=c(2,2))

and then

plot(results, index=2)
plot(results, index=3)
plot(results, index=4)
plot(results, index=5)

the plots display in full size only, as they are called, and not as one
combined image of four plots. This problem also happened to me last year
under earlier versions of R in Kubuntu Linux.

This command worked fine when I first started using R in Linux, I don't
think I'm doing much wrong in this instance and I would welcome any
explanation as to what exactly is going on here, as well as a solution.

-- 
Clive Nicholas

"My colleagues in the social sciences talk a great deal about methodology.
I prefer to call it style." -- Freeman J. Dyson

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
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.

Reply via email to