Giter Site home page Giter Site logo

psolymos / edmainr Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 2.0 51.77 MB

Euclidean Distance Matrix Analysis in R

Home Page: https://psolymos.github.io/EDMAinR

R 100.00%
morphometrics multivariate-statistics comparing-biological-shapes coordinate-free landmark-data

edmainr's Introduction

EDMAinR - Euclidean Distance Matrix Analysis in R

CRAN version CRAN download stats License: GPL v2

Linux build Status Windows build status codecov

A coordinate‐free approach for comparing biological shapes using landmark data

Install

if (!require("remotes")) install.packages("remotes")
remotes::install_github("psolymos/EDMAinR")

See what is new in the NEWS file.

License

GPL-2

Contributing

Feedback and contributions are welcome:

  • submit feature request or report issues here,
  • fork the project and submit pull request, see CoC.

Usage

library(EDMAinR)
#> EDMAinR 0.1-3     2020-06-12

file1 <- system.file("extdata/crouzon/Crouzon_P0_Global_MUT.xyz",
    package="EDMAinR")
x1 <- read_xyz(file1)
x1
#> EDMA data: Crouzon P0 MUT
#> 3 dimensions, 47 landmarks, 28 specimens

file2 <- system.file("extdata/crouzon/Crouzon_P0_Global_NON-MUT.xyz",
    package="EDMAinR")
x2 <- read_xyz(file2)
x2
#> EDMA data: Crouzon P0 UNAFF
#> 3 dimensions, 47 landmarks, 31 specimens

B <- 9

fit <- edma_fit(x1, B=B)
fit
#> EDMA nonparametric fit: Crouzon P0 MUT
#> Call: edma_fit(x = x1, B = B)
#> 3 dimensions, 47 landmarks, 28 replicates, 9 bootstrap runs

References

Lele, S. R., 1991. Some comments on coordinate-free and scale-invariant methods in morphometrics. American Journal of Physical Anthropology 85:407–417. doi:10.1002/ajpa.1330850405

Lele, S. R., and Richtsmeier, J. T., 1991. Euclidean distance matrix analysis: A coordinate-free approach for comparing biological shapes using landmark data. American Journal of Physical Anthropology 86(3):415–27. doi:10.1002/ajpa.1330860307

Lele, S. R., and Richtsmeier, J. T., 1992. On comparing biological shapes: detection of influential landmarks. American Journal of Physical Anthropology 87:49–65. doi:10.1002/ajpa.1330870106

Lele, S. R., and Richtsmeier, J. T., 1995. Euclidean distance matrix analysis: confidence intervals for form and growth differences. American Journal of Physical Anthropology 98:73–86. doi:10.1002/ajpa.1330980107

Hu, L., 2007. Euclidean Distance Matrix Analysis of Landmarks Data: Estimation of Variance. Thesis, Master of Science in Statistics, Department of Mathematical and Statistical Sciences, University of Alberta, Edmonton, Alberta, Canada. Pp. 49.

edmainr's People

Contributors

kmiddleton avatar psolymos avatar

Stargazers

 avatar  avatar

Watchers

 avatar

edmainr's Issues

can't install the package

Hello,

I can't install the package.
my R version is 2023.06.0+421 (2023.06.0+421)

I typed
if (!require(EDMAinR)) {
if (!require(remotes))
install.packages("remotes")
remotes::install_github("psolymos/EDMAinR")
}
1
yes

Then
library(EDMAinR)

Error message is here
Error in library(EDMAinR) : there is no package called ‘EDMAinR’

Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, ... :
there is no package called ‘EDMAinR’
2: In i.p(...) : installation of package ‘tinytex’ had non-zero exit status
3: In i.p(...) : installation of package ‘bslib’ had non-zero exit status
4: In i.p(...) : installation of package ‘shapes’ had non-zero exit status
5: In i.p(...) : installation of package ‘rmarkdown’ had non-zero exit status
6: In i.p(...) : installation of package ‘htmlwidgets’ had non-zero exit status

could you help me to solve this isuue?

Additional roadmap for version 0.1

  • add influential landmarks diagnosis to this package.
  • 'classification' where a new datum is to be classified to one of the possible groups. One can use EDMA or Procrustes to do that as was mentioned in the purple book. Those two are important methodologies.
  • prediction of a missing landmark for a datum.

Visualization improvements

CLI

  • Expose hclust methods
  • Allow changing colors, sizes, pch in plots
  • Add color palette option that can be changed
  • Allow using user defined groups (?)
  • Expose concatenate method for homologous landmark objects
  • More flexible options for showing significant DM edges and influential landmarks

Docs

  • Plot methods need better instructions
  • Explain all settings & options for plots (see in CLI)
  • Explain PCA/HCA methodology

Other

  • 3D mesh example
  • Read other landmark formats (tps, morphologica)

Roadmap for version 0.1

Data input

  • read .xyz landmark data file
  • define data object (data is a list of length n, KxD matrices)
  • print method for data object (number of landmarks, dims, replicates; names, labels)
  • stack method to turn list into stacked X matrix
  • subset method: useful for bootstrap; subsetting landmarks, dimensions too

Nonparametric estimation

  • fitting function
  • return object structure
  • bootstrap method
  • print method
  • summary method
  • plot method: 2D
  • plot method: 3D (using FM based MDS and CIs)

Output from nonparametric estimation

  • compare 2 fitted models (numerator vs. denominator)
  • form matrix (option to sort the stacked version)
  • form difference matrix (FDM) with bootstrap based marginal CIs (option to sort the stacked version)
  • bootstrap based T statistic testing
  • growth matrix, growth difference matrix (GDM) with bootstrap based marginal CIs
  • plot for T statistic distribution
  • plot for FDM and GDM
  • save outputs as sheets in xlsx file format

Parametric estimation

  • add different parametric forms forms, most basic: sigma^2*I
  • identifiability testing suite: check structural constraints
  • user provides a "structure" matrix as input, parametric fit and identifiability testing to follow

Documentation and testing

  • R help files for functions
  • imports, namespace, etc (R package checking stuff)
  • examples for the help files
  • tutorial describing the steps
  • add unit tests
  • add Linux/Windows CI/CD tests

Other

  • explore other file formats (see how other packages do it, conversion methods)
  • add parallel option to speed up bootstrap with multiple cores

For features outside of v 0.1, see #2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.