[R] Is there an lm() equivalent of panel.lmline()?

Alex van der Spek doorz at xs4all.nl
Tue Oct 30 12:53:19 CET 2012

panel.lmline returns intercept and slope of y ~ x subsetted to the
combination of conditioning factors given to xyplot in lattice.

for instance:

xyplot(Xvalues ~ log(Qvalues)|Tfac, data = df7, panel = panel.lmline)

I am looking to find the equivalent formulation for lm() proper. If I do

lmcal <- lm(Xvalues ~ log(Qvalues):Tfac, data = df7)

Only one value of the intercept is returned. It appears as all the
'individual' intercepts are summed to form one overall intercept.

Any help much appreciated!

Alex van der Spek

More information about the R-help mailing list