knitr::opts_chunk$set(comment=NULL) knitr::opts_chunk$set(fig.width=6, fig.height=4) suppressPackageStartupMessages(library(TestDimorph))
| Function | Description | Notes | |-------------|------------------------------|-----------------------------| | aov_ss | Calculates sex specific one-way ANOVA from summary statistics and performs pairwise comparisons | Uses the summary statistics | | D_index | Dissimilarity index [@RN7899] for statistical computation and visualization of the area of non-overlap in the trait distribution between the sexes. | Provides a table and a graphical representation of the selected traits and their corresponding dissimilarity indices. Also provides confidence intervals via a bias-corrected parametric bootstrap. | | extract_sum | Extract summary statistics needed for the other functions from uploaded raw data directly without need to go to a third-party package. | Can also run the aov_ss, multivariate, t_greene, univariate, or van_vark functions after extracting the summary statistics. | | Hedges_g | Calculates Hedges' [-@RN11055] for effect size between the sexes for a single trait. The confidence interval is found using a method described in @RN8020. | Can also find the confidence interval using a bias-corrected parametric bootstrap. | | MI_index | Mixture Index is the mixture intersection measure of sexual dimorphism [@RN7880]. @RN7880 also define a normal intersection NI measure which is the overlap coefficient of two normal distributions, equivalent to Inman and Bradley's [-@RN7898] overlap coefficient. | Can produce confidence intervals using a bias-corrected parametric bootstrap. | | multivariate | An extension of the univariate analysis of sexual dimorphism between different samples. MANOVA test is used to analyze the interaction effects and main effects. | Type of MANOVA test employed can be "I", "II" or "III" sum of squares and cross products. The test statistics can be Wilks' lambda, Pillai's trace, Hotelling-Lawley's trace or Roy's largest root. If univariate argument is TRUE, the function conducts ANOVAs on each variable. | | raw_gen | Raw data generation from summary statistics using univariate or multivariate normal distributions (with truncation as an option). | | | t_greene | Relethford and Hodges' (1985) and Greene's (1989) t-test of sexual dimorphism. | A plot of p-values for differences in sexual dimorphism across all pairs of samples can be produced with plot=TRUE | | univariate | Univariate analysis of sexual dimorphism using two-way ANOVA. | Type of sums of squares can type type "I", "II", or "III." | | van_vark | Provides testing for differences in sexual dimorphism between samples using van Vark et al.'s [-@RN7879] method. | |
Table.02=function () { library(TestDimorph) options(width=100) # This option just for output from Rmarkdown NHANES_univariate<<-extract_sum(NHANES_1999,test='uni',run=FALSE) # BMXWT (Body mass) univariate(NHANES_univariate,es_anova = "eta2",pairwise = TRUE) } Table.02()
Table.03=function() { library(TestDimorph) NHANES_multivariate<<-extract_sum(NHANES_1999,test='multi',run=FALSE) multivariate(NHANES_multivariate) } Table.03()
Table.04=function() { library(TestDimorph) print(univariate(NHANES_univariate, type_anova='III')) t_greene(NHANES_univariate,plot = TRUE,padjust ="fdr") } Table.04()
Table.05=function() { library(TestDimorph) to_van_Vark=extract_sum(Howells,test='van',run=F) van_vark(to_van_Vark) } Table.05()
Table.06=function () { # Comparisons of femur head diameter in four populations library(TestDimorph) df <- data.frame( Pop = c("Turkish", "Bulgarian", "Greek", "Portuguese"), m = c(150.00, 82.00, 36.00, 34.00), f = c(150.00, 58.00, 34.00, 24.00), M.mu = c(49.39, 48.33, 46.99, 45.20), F.mu = c(42.91, 42.89, 42.44, 40.90), M.sdev = c(3.01, 2.53, 2.47, 2.00), F.sdev = c(2.90, 2.84, 2.26, 2.90) ) print(aov_ss(x = df, CI=0.95),digits=6) } Table.06()
Table.07=function (i.which=13) { library(TestDimorph) print(MI_index(Cremains_measurements[i.which,],B=1000,rand=F,verbose=F,plot=T)) print(MI_index(Cremains_measurements[i.which,],index_type='NI', B=1000,rand=F,plot=T,verbose=F)) print(D_index(Cremains_measurements[i.which,],B=1000,rand=F,verbose=F,plot=T)) print(Hedges_g(Cremains_measurements[i.which,],B=1000,rand=F,verbose=F)) } Table.07()
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.