fit<- Tps( BD[,1:4], BD$lnya) # fit surface to data
# evaluate fitted surface for first two
# variables holding other two fixed at median values
out.p<- predict.surface(fit)
surface(out.p, type="C")
#
# plot surface for second and fourth variables
# on specific grid.
glist<- list( KCL=29.77, MgCl2= seq(3,7,,25), KPO4=32.13,
dNTP=seq( 250,1500,,25))
out.p<- predict.surface(fit, glist)
surface(out.p, type="C")
out.p<- predict.surface.se(fit, glist)
surface(out.p, type="C")
# the unbiquitous ozone data set day 16
data( ozone2)
obj<- Tps(ozone2$lon.lat,ozone2$y[16,], m=3)
lookd<- predict.surface.derivative( obj)
set.panel( 2,1)
image.plot( lookd$z[,,1])
image.plot( lookd$z[,,2])
Run the code above in your browser using DataLab