% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/calcWindowDistPI.R
\name{calcWindowDistPI}
\alias{calcWindowDistPI}
\title{Estimate the PI for the distance to a fixed region of interest}
\usage{
calcWindowDistPI(
  pSub,
  owins,
  centroids,
  ecdfAll,
  pi,
  null,
  ecdfs,
  cellAndGene,
  feat
)
}
\arguments{
\item{pSub}{The subset point pattern containing only a single gene}

\item{owins, centroids}{The list of windows corresponding to cells,
and their centroids}

\item{ecdfAll}{the cumulative distribution function under the null}

\item{pi}{The type of PI to calculate}

\item{null}{A character vector, indicating how the null distribution is
defined. See details.}

\item{ecdfs}{The ecdfs of the distances of every single point in the cell}

\item{cellAndGene}{The marks dataframe with cell and gene, used to match the
observations with the ecdfs}

\item{feat}{The feature}
}
\value{
A list of vectors of estimated probabilistic indeces per event
}
\description{
Estimate the PI for the distance to a fixed region of interest
}
\details{
Analysis of the distance to the border was introduced by \insertCite{Joyner2013}{smoppix} in the form of the B-function.
The independent evaluations of the B-functions per cell are here returned as realizations of the probabilistic index.
}
\references{
\insertAllCited{}
}
\seealso{
\link{addCell}, \link{estPis}
}
