Calculation of Principal Nested Spheres
pns(x, sphere.type = "seq.test", alpha = 0.1, R = 100, nlast.small.sphere = 0)
a (d + 1) x n data matrix where each column is a unit vector in S^d and n is the sample size.
a character string specifying the type of sphere fitting method. "seq.test" specifies sequential tests to decide either "small" or "great"; "small" specifies Principal Nested SMALL Sphere; "great" specifies Principal Nested GREAT Sphere (radius pi/2); "BIC" specifies BIC statistic to decide either "small" or "great"; and "bi.sphere" specifies Principal Nested GREAT Sphere for the first part and Principal Nested SMALL Sphere for The default is "seq.test".
significance level (0 < alpha < 1) used when sphere.type = "seq.test". The default is 0.1.
the number of bootstrap samples to be evaluated for the sequential test. The default is 100.
the number of small spheres in the finishing part used when sphere.type = "bi.sphere".
A list with components
the residual matrix (X_PNS). Each entry in row k works like the kth principal component $PNS = the list with the following components.
the size (radius) of PNS.
the orthogonal axis v_i of subspheres.
the distance r_i of subspheres
the p-values of LRT and parametric boostrap tests (if any).
the estimated ratios. Now unavailable.
the location of the PNS mean.
the type of method for fitting subspheres.
proportion of variances explained.
Dryden, I.L., Kim, K. and Le, H. (2018). Principal nested shape spaces, with applications to molecular dynamics data. Technical report.
Jung, S., Dryden, I.L. and Marron, J.S. (2012). Analysis of principal nested spheres. Biometrika, 99, 551-568.
pns4pc
# NOT RUN {
# out <- pc2sphere(x = gorf.dat, n.pc = 2)
# spheredata <- t(out$spheredata)
# pns.out <- pns(x = spheredata)
# }
Run the code above in your browser using DataLab