fitmodel-class: Class '"fitmodel"' from Niche Apportionment fitting

Description Objects from the Class Slots Methods Author(s) Examples

Description

Encapsulate results from Niche Apportionment fitting

Objects from the Class

Objects can be created by calls of the form new("fitmodel", ...). Object results mainly from procedures executed from fitmodel or fitmodelCl call.

Slots

call:

Object of class "list" containing:

model

Character containing model name.

nRepl

Number of replicates.

nRank

Number of ranks.

nRand

Number of randomizations.

count

Logical value informing if observed values are counts (discrete).

Tstats:

Object of class "list" containing:

dTmean

Vector containing distribution of T values for mean.

dTvar

Vector containing distribution of T values for variance.

TMobs

Observed value of T for mean.

TVobs

Observed value of T for variance.

pvalue

Matrix containing p-value for mean and variance.

sim.stats:

Object of class "matrix" containing mean and variance of simulated relative abundance of each rank.

sim.range:

Object of class "list" containing:

mean

Matrix containing minimum and maximum simulatated relative abundance mean of each rank.

variance

Matrix containing minimum and maximum simulated relative abundance variance of each rank.

obs.stats:

Object of class "matrix" containing mean and variance observed relative abundance of each rank of all replicates.

Methods

hist

signature(x = "fitmodel"): Plot histogram of simulated T values. Arguments are: stat and arrow.col.

lines

signature(x = "fitmodel"): Plot line of fitted model (mean of the each rank of the simulation for the model). Arguments are: stat, base, range, range.lty and range.col.

plot

signature(x = "fitmodel"): Plot the ranked observed abundance (mean of each rank of the observed data). Arguments are: stat and base.

qqplot

signature(x = "fitmodel"): Quantile-Quantile plot (mean of observed data versus mean of fitted model). Arguments are: stat, base, range, qqline, range.lty, range.col, in.col and out.col.

show

signature(object = "fitmodel"): Display the object summary.

Arguments

arrow.col

Character informing the arrow color of observed T value at histogram plot.

base

Numeric informing the base of logarithm. If this value is different of NULL, then data are transformed to logarithm.

in.col

Character informing the color of observed fitted values (within of simulated range).

out.col

Character informing the color of observed non fitted values (out of simulated range).

qqline

Logical informing if qqline must be plotted.

range

Logical informing if minimum and maximum line must be plotted.

range.col

Character informing the color of range plot. When NULL (default) is equal to col.

range.lty

Numerical informing the line type of range plot.

stat

Character informing if line must be plotted using mean ("mean") or variance ("variance") of model simulation.

Author(s)

Mario J. Marques-Azevedo

Maintainer: Mario J. Marques-Azevedo <mariojmaaz@gmail.com>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  data <- matrix(nrow = 10, ncol = 40)
  for(i in 1:length(data[ ,1])){
    data[i, ] <- randFraction(N = 100, S = 40, count = FALSE)
  }
  m1 <- fitmodelCl(x = data, model = "randFraction", count = FALSE, nRand = 99, nCores = 2)
  m1
  plot(m1, base = 2)
  lines(m1, base = 2, range = TRUE)
  
  # QQplot
  qqplot(m1, base = 2, range = TRUE)
  
  # Histogram
  hist(m1)

  # List slots of S4 object slots
  getSlots('fitmodel')
  
  # Get slot with simulated stattistics
  m1@sim.stats

  # Get slot with observed data
  m1@obs.stats

MarioJose/nicheApport documentation built on May 7, 2019, 2:52 p.m.