require(ppls)
data(BOD)
X<-BOD[,1]
y<-BOD[,2]
Xtest=seq(min(X),max(X),length=200)
dummy<-X2s(X,Xtest,deg=3,nknot=20)
Z<-dummy$Z
Ztest<-dummy$Ztest
size<-dummy$sizeZ
P<-Penalty.matrix(size,order=2)
lambda<-200
number.comp<-3

penalized.pls(Z,y,P=lambda*P,ncomp=number.comp)$coefficients # By default
kernel=F
penalized.pls(Z,y,P=lambda*P,ncomp=number.comp,kernel=TRUE)$coefficients #
Same as above...?!
penalized.pls.kernel(Z,y,M=lambda*P,ncomp=number.comp) # But using directly,
coefficients are different.

-- 
Miłego dnia

	[[alternative HTML version deleted]]

