You may use predict.lm method!

---------- Início da mensagem original -----------
De: r-help-bounces@stat.math.ethz.ch
Para: r-help@stat.math.ethz.ch
Cc:
Data: Tue, 17 Oct 2006 12:34:12 -0700 (PDT)
Assunto: [R] Predicted value at a new level in lm
> Y X Z
> 42.0 7.0 33.0
> 33.0 4.0 41.0
> 75.0 16.0 7.0
> 28.0 3.0 49.0
> 91.0 21.0 5.0
> 55.0 8.0 31.0
>
>
> data<-read.table("d.txt",header=TRUE)
> mod<-lm(data$Y~data$X+data$Z)
> ---------------------------------------
>
> I would like to know the predict value at a new level,
> say
>
> X=10 Z=30
>
> Is there a function available to calculate it
> directly?
>
> Thank you
>
> ______________________________________________
> R-help@stat.math.ethz.ch 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.
>

	[[alternative HTML version deleted]]

