Colleagues: I am analyzing several years of micrometeorogical data 
measured at hourly intervals in forest stands of varying density. The 
experiment had 4 treatments and three blocks.
I am using the Assist package to fit a cubic spline to the temporal 
pattern, but am running into difficulty with syntax, not to mention the 
concept of a reproducing kernel. Am getting the 
opaque "object of type closure is not subsettable" message. Can anyone 
offer suggestions?

Below is code that generates a year's data for three blocks and four 
treatments, reported at, say, 2-weekly intervals, and my stab at 
analyzing.

Dr. Seth  W. Bigelow
Biologist, USDA-FS Pacific Southwest Research Station
sbigelow@fs.fed.us /  ph. 530 759 1718

#############

library(lattice)
library(assist)

### generate data: 4 treatments (tx), 3 blocks (bk) 
#########################

g               <- expand.grid(tx = 1:4, bk = 1:3, wk=seq(pi,3*pi,0.4))  # 
generate treatment block and week normalized
g$t             <- with(g,10*(1+cos(wk)) + (tx) + (0.2*bk)+ rnorm(nrow(g), 
0, 2))  # generate temperature (t) with cosine, use tx & bk for effects, 
plus stochasticity
g$wkscale       <- (g$wk - min(g$wk))/(max(g$wk) - min(g$wk)) # scale time 
variable wk on 0-1 interval

xyplot(t~wkscale|bk, g, groups=tx, type='l') # view data

##### SSR, smoothing spline regression ###################### 

myssr <- ssr(t~ tx + bk + wkscale, # specifies parametric part of the 
model
        rk = list(cubic(wkscale)),      # (required) reproducing kernel: 
linear, cubic, quintic, and septic for linear, tp for thin-plate-splines
        data = g, 
        correlation = corCAR1, # corCAR1-continuous autoregressive process 
(AR(1) process for a continuous time covariate). 
        spar = "m" # m = GML method for choosing smoothing parameter
        )

##### End #######

	[[alternative HTML version deleted]]

