How to use different title in a loop
see ?paste
main = paste ("Main effect of ", variable)
par(mfrow = c(n/2, 2))
for ( i in 1:n)
{
plot(1:J, y[i, 1: J], main = 'Main effect of X_i')
}
see ?paste
main = paste ("Main effect of ", variable)
par(mfrow = c(n/2, 2))
for ( i in 1:n)
{
plot(1:J, y[i, 1: J], main = 'Main effect of X_i')
}