Dennis Murphy wrote:
Hi:
Does this work for you?
xyplot(distance ~ age | Sex, data = Orthodont, groups = Subject,
main = 'Individual linear regressions ~ age', type = c('g', 'r'),
panel = function(x, y, ...) {
panel.xyplot(x, y, ..., col = gray(0.5))
On Wed, Jun 23, 2010 at 11:35 PM, Michael Friendly wrote:
> Thanks, Deepayan
>
> I read your presentation and understand how this works for the case you
> presented, but I can't
> get it to work for my case, where I want to superimpose model fitted lines
> over individual
> subject regression line
Hi:
Does this work for you?
xyplot(distance ~ age | Sex, data = Orthodont, groups = Subject,
main = 'Individual linear regressions ~ age', type = c('g', 'r'),
panel = function(x, y, ...) {
panel.xyplot(x, y, ..., col = gray(0.5))
panel.lmline(x, y
Thanks, Deepayan
I read your presentation and understand how this works for the case you
presented, but I can't
get it to work for my case, where I want to superimpose model fitted
lines over individual
subject regression lines. Here's what I tried
library(nlme)
library(lattice)
##
On Tue, Jun 22, 2010 at 9:30 AM, Michael Friendly wrote:
> Consider the following plot that shows separate regression lines ~ age for
> each subject in the Pothoff-Roy Orthodont data,
> with separate panels by Sex:
>
> library(nlme)
> #plot(Orthodont)
> xyplot(distance ~ age|Sex, data=Orthodont, t
Michael,
Look at the ancova function in the HH package.
## install.packages("HH") ## if not there yet.
library(HH)
library(nlme) ## for the Orthodont data
ancova(distance ~ age*Sex, data=Orthodont)
ancova(distance ~ age+Sex, data=Orthodont)
ancova(distance ~ age, groups=Sex, data=Orthodont)
anc
Consider the following plot that shows separate regression lines ~ age
for each subject in the Pothoff-Roy Orthodont data,
with separate panels by Sex:
library(nlme)
#plot(Orthodont)
xyplot(distance ~ age|Sex, data=Orthodont, type='r', groups=Subject,
col=gray(.50),
main="Individual linear
7 matches
Mail list logo