Hi,

 

I don't know how to make prediction with a factor in the linear model.

Say

yd=c(1,2,3,4,5)

> sl=c(2,3,4,5,6)

> sex=c("male","male","female","female","male")

> sex=factor(sex)

> m=lm(sl~yd+sex+sex:yd)

 

How to make a prediction with new data like yd=c(4,5,6,7,8) for male and
female separately ?

 

Thank you very much.

 

Zhao Jin


	[[alternative HTML version deleted]]

