ans <- pnss3d( macf.dat, sphere.type="BIC", n.pc=8)
y <- backfit( ans$PNS$scores[1,] , ans ,type="pnss")
riemdist( macf.dat[,,1] , y ) #should be close to zero
ans2 <- procGPA( macf.dat, tangentcoords="partial")
y <- backfit( ans2$scores[1,] , ans2 ,type="pca")
riemdist( macf.dat[,,1] , y ) #should be close to zero
Run the code above in your browser using DataLab