Learn R Programming

GET (version 0.1-3)

GET.necdf: Graphical n sample test of correspondence of distribution functions

Description

Compare the distributions of two (or more) groups.

Usage

GET.necdf(x, r = seq(min(unlist((lapply(x, min)))), max(unlist((lapply(x,
  max)))), length = 100), summaryfun = c("means", "contrasts"), nsim,
  ...)

Arguments

x

A list (of length n) of values in the n groups.

r

The sequence of argument values at which the distribution functions are compared. The default is 100 equally spaced values between the minimum and maximum over all groups.

summaryfun

Possible values are "means" and "contrasts". See graph.fanova for more information.

nsim

The number of random permutations.

...

Additional parameters to be passed to global_envelope_test.

Details

The default number of permutation, if nsim is not specified, is n*1000 - 1 for the case "means" and (n*(n-1)/2)*1000 - 1 for the case "contrasts", where n is the length of x.

Examples

Run this code
# NOT RUN {
if(require(fda, quietly=TRUE)) {
  # Heights of boys and girls at age 10
  f.a <- growth$hgtf["10",] # girls at age 10
  m.a <- growth$hgtm["10",] # boys at age 10
  # Empirical cumulative distribution functions
  plot(ecdf(f.a))
  plot(ecdf(m.a), col=grey(0.7), add=TRUE)
  # Create a list of the data
  fm.list <- list(Girls=f.a, Boys=m.a)
  
# }
# NOT RUN {
  res_m <- GET.necdf(fm.list, summaryfun="means")
  plot(res_m)
  res_c <- GET.necdf(fm.list, summaryfun="contrasts")
  plot(res_c)
  
# }
# NOT RUN {
  
# }
# NOT RUN {
  # Heights of boys and girls at age 14
  f.a <- growth$hgtf["14",] # girls at age 14
  m.a <- growth$hgtm["14",] # boys at age 14
  # Empirical cumulative distribution functions
  plot(ecdf(f.a))
  plot(ecdf(m.a), col=grey(0.7), add=TRUE)
  # Create a list of the data
  fm.list <- list(Girls=f.a, Boys=m.a)
  
# }
# NOT RUN {
  res_m <- GET.necdf(fm.list, summaryfun="means")
  plot(res_m)
  res_c <- GET.necdf(fm.list, summaryfun="contrasts")
  plot(res_c)
  
# }
# NOT RUN {
  
# }
# NOT RUN {
}
# }

Run the code above in your browser using DataLab