Library: | gam |
See also: | gamfit gamopt intest intestpl gintest gintestpl |
Quantlet: | gamout | |
Description: | auxiliary quantlet, creates a nice output for GAM. |
Usage: | gamout(t,y,m,b,const{,opt}) | |
Input: | ||
t | n x p matrix, the predictor variables. | |
y | n x 1 vector, the response variables. | |
m | n x dd matrix, estimated functions. | |
b | p x 1 vector, estimated coefficients. | |
const | scalar, the estimated constant. | |
opt | optional list, ouput of gamopt. The order of the elements of the list is not important, parameters not given are replaced by defaults. See gamopt for more details. |
library("gam") n=100 b=1|2 p=rows(b) x=2.*uniform(n,p)-1 t=2.*uniform(n,1)-1 y=x*b+t^3+normal(n)./2 opt=gamopt("x",x,"pl",1) {m,b,const}=backfit(t,y,1,0,"qua",opt) gamout(t,y,m,b,const,opt)
Display with estimated functions, data points and display with coefficients for discrete variables.