# NOT RUN {
# }
# NOT RUN {
data(eco.test)
# ---global analysis---
globaltest <- eco.malecot(eco=eco, method = "global", smax=10,
size=1000)
eco.plotCorrelog(globaltest) # Significant mean class coancestry classes at
# individual level (alpha = 0.05,
# out of the red area),
# and family-wise P corrected values (red-blue
# points, indicated in the legend)
# ecoslot.SP(globaltest) contains:
# - the slope (bhat) and values with confidence intervals
# of the regression reg = kinship ~ ln(distance_between_individuals)
#- A Mantel test result for assesing the relation between
# between kinship and ln(distance_between_individuals)
#- A cubic interpolation between the residuals of reg and
# ln(distance_between_individuals)
#- the sp statistic and its confidence interval
# ecoslot.OUT(globaltest) contains:
# - In permutation case, the values of mean and log-mean distance
# classes; observed class value; expected + alternative + P value,
# the bootstrap null confidence intervals and
# jackknife statistics (jackknifed mean, jackknifed SD, and
# CI for the class statistic)
# - In bootstrap case, the values of mean and log-mean distance
# classes;the bootstrap null confidence intervals and
# jackknife statistics (jackknifed mean, jackknifed SD, and
# CI for the class statistic)
# A directional approach based in bearing correlograms, 30 degrees
globaltest_30 <- eco.malecot(eco=eco, method = "global", smax=10,
size=1000, angle = 30)
eco.plotCorrelog(globaltest)
#----------------------------------------------------------#
# ---local analysis---
# (using the spatial weights).
# ---local analysis with k nearest neighbors---
localktest <- eco.malecot(eco=eco, method = "local",
type = "knearest", kmax = 5,
adjust = "none")
eco.plotLocal(localktest)
# ---local analysis with radial distance---
localdtest <- eco.malecot(eco=eco, method = "local",
type = "radialdist", smax = 3,
adjust = "none")
eco.plotLocal(localdtest) # rankplot graphic (see ?"eco.rankplot")
# Significant values
# in blue-red scale,
# non significant
# values in yellow
eco.plotLocal(localktest, significant = FALSE) # significant and non
# signficant values
# in blue-red scale
# The slot OUT of localktest (ecoslot.OUT(localktest)) and localdtest
# (ecoslot.OUT(localdtest)) contains:
# - the mean distance per individual, observed value of the
# statistic, expected + alternative + P value + null hypotesis
# confidence intervals, or boostrap confidence intervals in
# permutation or bootstrap cases, respectively.
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab