data(prostate)
# SGPLS with eta=0.6 & 3 hidden components
f <- sgpls( prostate$x, prostate$y, K=3, eta=0.6, scale.x=FALSE )
print(f)
# Print out coefficients
coef.f <- coef(f)
coef.f[ coef.f!=0, ]Run the code above in your browser using DataLab