% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ecdf_compare_niche.R
\name{ecdf_compare_niche}
\alias{ecdf_compare_niche}
\title{Simulations and analyses of Mahalanobis distance-based habitat suitability}
\usage{
ecdf_compare_niche(
  p_vals = 1:5,
  n_vals = seq(20L, 500L, 20L),
  n_reps = 30L,
  seed = NULL
)
}
\arguments{
\item{p_vals}{Integer vector; number of predictor variables (dimensions).}

\item{n_vals}{Integer vector; number of records (sample sizes).}

\item{n_reps}{Integer; number of replicates per combination.}

\item{seed}{Optional integer for reproducibility.}
}
\value{
A list with:
\itemize{
\item cor_plot: ggplot of correlation vs sample size.
\item suit_plot: ggplot of suitability vs Mahalanobis distance.
\item cond_plot: ggplot of correlation vs condition number.
\item cor_df: raw correlation data.
\item obs_df: observation-level data.
\item cov_df: covariance diagnostics.
}
}
\description{
The objective is to compare the performance of habitat suitability calculated
based on chi-squared cumulative distribution function and Empirical
Cumulative Distribution Function (ECDF)
}
\details{
Performs replicated simulations of multivariate normal data to evaluate
the agreement between suitability derived from chi-squared distribution
and empirical cumulative distribution function (ECDF).
}
\examples{
# Create ECDF-niche based on personalized options:
n <- ecdf_compare_niche(p_vals = 1:3,
                        n_vals = seq(50L, 500L, 50L),
                        n_reps = 10L,
                        seed = 1991)

}
\author{
Matheus T. Baumgartner
}
