[R] plot.gam

Thomas Lumley thomas at biostat.washington.edu
Fri Apr 7 17:13:01 CEST 2000

On Fri, 7 Apr 2000, Werner Stahel wrote:

> I have just fitted a lm model containing a bs smooth term.
> I asked Martin how I could see the estimated function.
> He said that such a possibility -- 
> which is available in S-Plus' plot.gam --
> was on your list of desirable functions.
> This is a vote to give it high priority.

You *can* see the estimated function with predict(,type="terms")


	plot(x,tm[,"bs(x, 6)"]

(or for a curve plot)

	plot(x[oo],tm[oo,"bs(x, 6)"]

If you want pointwise standard errors use
	predict(model, type="terms",se.fit=TRUE)


Thomas Lumley
Assistant Professor, Biostatistics
University of Washington, Seattle

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list