Hi Everyone, I'm trying to obtain the 95% CI for the loadings of a phylogenetic pca in order to improve the interpretation of axes. I'm trying to implement this in boot package by modifying this code that uses prcomp:
https://stackoverflow.com/questions/31044922/confidence-intervals-of-loadings-in-principal-components-in-r but since the phylogenenetic pca also requires a tree object, I'm not sure how to get it. Here is my try: getPrcStat <- function (samdf,vname,pcnum){ prcs <- phyl.pca(fish_tree,samdf, mode = "corr") # returns matrix return(prcs$L[ vname,pcnum ]) # pick out the thing we need } bootEst <- function(df,d){ sampledDf <- df[ d, ] # resample dataframe return(getPrcStat(sampledDf,"areahema",1)) } bootOut <- boot(my_data_frame,bootEst,R=10000) I have tried with phytools::phylo.pca and also adephylo::ppca and nothing seems to work. Appreciate if anyone could help. -- Sincerely, Diogo Borges Provete, PhD Personal web page <http://diogoprovete.weebly.com> Assistant Professor Department of Ecology Institute of Biosciences <https://inbio.ufms.br> Federal University of Mato Grosso do Sul <https://www.ufms.br/en/> Campo Grande, Brazil Fellow Global Biodiversity Centre <https://ggbc.gu.se> University of Gothenburg Gothenburg, Sweden Skype: diogoprovete Editor: Amphibia-Reptilia <https://brill.com/view/journals/amre/amre-overview.xml?lang=en> [[alternative HTML version deleted]] _______________________________________________ R-sig-phylo mailing list - R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/