{"id":24895411,"url":"https://github.com/watanabe-j/avrevol","last_synced_at":"2025-03-27T15:25:58.948Z","repository":{"id":185283524,"uuid":"595722235","full_name":"watanabe-j/avrevol","owner":"watanabe-j","description":"R package for average evolvability measures","archived":false,"fork":false,"pushed_at":"2024-07-18T12:48:19.000Z","size":211,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-01T19:18:22.526Z","etag":null,"topics":["evolutionary-biology","morphometrics","quantitative-genetics","r","r-package"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/watanabe-j.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-31T17:18:17.000Z","updated_at":"2024-07-18T12:48:22.000Z","dependencies_parsed_at":"2024-07-18T12:06:04.112Z","dependency_job_id":null,"html_url":"https://github.com/watanabe-j/avrevol","commit_stats":null,"previous_names":["watanabe-j/avrevol"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/watanabe-j%2Favrevol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/watanabe-j%2Favrevol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/watanabe-j%2Favrevol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/watanabe-j%2Favrevol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/watanabe-j","download_url":"https://codeload.github.com/watanabe-j/avrevol/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245870039,"owners_count":20685959,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["evolutionary-biology","morphometrics","quantitative-genetics","r","r-package"],"created_at":"2025-02-01T19:18:28.266Z","updated_at":"2025-03-27T15:25:58.928Z","avatar_url":"https://github.com/watanabe-j.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\nbibliography: man/bibliography.bib\nlink-citations: TRUE\nnocite: |\n  @MarroigEtAl2009\n  @BolstadEtAl2014\n  @MeloEtAl2016\ncsl: man/cran_style.csl\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n```{r setup, include = FALSE}\nset.seed(601)\n```\n\n\n# avrevol: R Package for Average Evolvability Measures\n\n\u003c!-- badges: start --\u003e\n\u003c!-- badges: end --\u003e\n\nThis small package provides wrapper functions to evaluate average evolvability\nmeasures in evolutionary quantitative genetics, based on the\nimplementation of recursion-based evaluation of moments of ratios of\nquadratic forms in the package `qfratio`\n([CRAN](https://CRAN.R-project.org/package=qfratio){target=\"_blank\"};\n[GitHub](https://github.com/watanabe-j/qfratio){target=\"_blank\"}).\n\nThe package `qfratio` provides functions to evaluate moments of\nratios of quadratic forms in normal variables using recursive algorithms.\nThat package was originally developed for evaluating average evolvability\nmeasures [@Watanabe2023cevo], but is capable of evaluating moments in rather\ngeneral conditions beyond those.\nThe idea of this package is to provide a simple, convenient interface\nspecifically aiming at average evolvability measures, by passing\nappropriately specified arguments to functions from the `qfratio`\npackage.\nAll average evolvability measures treated by @Watanabe2023cevo are implemented,\naccommodating arbitrary mean and covariance for the selection gradients.\n\nAs a supplement, this package also has functions to obtain Monte Carlo\nsamples for evolvability measures (including the random skewers correlation),\nas well as the delta method approximations for average evolvability measures\nby @HansenHoule2008.\nExisting packages like `evolvability`\n([CRAN](https://cran.r-project.org/package=evolvability))\nand `evolqg` ([GitHub](https://github.com/lem-usp/EvolQG)) have these\nfunctionalities, but this package's implementation is more general (Monte Carlo\nversions accommodate arbitrary mean and covariance) and faster, at least as of\nwriting this.\n\n\n## Installation\n\n### From GitHub\n```{r eval = FALSE}\n# install.packages(\"devtools\")\ndevtools::install_github(\"watanabe-j/avrevol\")\n```\n\n### Dependencies\n\n    Imports: qfratio, MASS\n\n\n## Example\n\nHere are hypothetical examples for typical use cases:\n\n```{r example}\nlibrary(avrevol)\n\n## Simple covariance matrices\nnv \u003c- 4\nG1 \u003c- diag(nv:1)\nG2 \u003c- diag(sqrt(1:nv))\nnit \u003c- 1000\n\n## Average conditional evolvability using series expression\n## Inspect plot to check for convergence\n(res_cevo \u003c- avr_cevo(G1))\nplot(res_cevo)\n\n## Hansen \u0026 Houle's (2008) delta method approximation of the same\nhh_cevo(G1)\n\n## Monte Carlo sample of conditional evolvability\n## under spherical distribution of beta,\n## and its mean as an estimate of average conditional evolvability\n## plus its 95% CI\nmcsample_cevo \u003c- mc_cevo(nit, G1)\nmean(mcsample_cevo)\nmean(mcsample_cevo) + sd(mcsample_cevo) / sqrt(nit) *\n    qt(c(0.025, 0.975), nit - 1)\n\n## Average response difference using series expression,\n## Hansen-Houle delta method approximation, and\n## Monte Carlo estimate\n(res_rdif \u003c- avr_rdif(G1, G2))\nplot(res_rdif)\nhh_rdif(G1, G2)\nmean(mc_rdif(nit, G1, G2))\n\n## Average response correlation using series expression and\n## its Monte Carlo estimate, aka \"random skewers\" correlation\n(res_rcor \u003c- avr_rcor(G1, G2, m = 500))\nplot(res_rcor)\nmean(mc_rcor(nit, G1, G2))\n\n## Advanced: Average evolvability under\n## non-spherical distribution of selection gradient\n## (the same works for other evolvability measures as well)\nmu \u003c- nv:1 / nv\nSigma \u003c- matrix(0.5, nv, nv)\ndiag(Sigma) \u003c- 1\n(res_evol_nsph \u003c- avr_evol(G1, mu = mu, Sigma = Sigma))\nplot(res_evol_nsph)\nmean(mc_evol(nit, G1, mu = mu, Sigma = Sigma))\n```\n\n## References\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwatanabe-j%2Favrevol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwatanabe-j%2Favrevol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwatanabe-j%2Favrevol/lists"}