test_panel: Dispersion Test for Spatial Point Pattern in Array dPCR Based...

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

Performs a test of Complete Spatial Randomness for each plate. This function is a wrapper around quadrat.test function working directly on the objects of adpcr.

Usage

1
2
3
test_panel(X, nx = 5, ny = 5, alternative = c("two.sided", "regular",
  "clustered"), method = c("Chisq", "MonteCarlo"), conditional = TRUE,
  nsim = 1999)

Arguments

X

Object of the adpcr class containing data from one or more panels.

nx

Number of quadrats in the x direction.

ny

Number of quadrats in the y direction.

alternative

character string (partially matched) specifying the alternative hypothesis.

method

character string (partially matched) specifying the test to use: either "Chisq" for the chi-squared test (the default), or "MonteCarlo" for a Monte Carlo test.

conditional

logical. Should the Monte Carlo test be conducted conditionally upon the observed number of points of the pattern? Ignored if method="Chisq".

nsim

The number of simulated samples to generate when method="MonteCarlo".

Details

Under optimal conditions, the point pattern of dPCR events (e.g., positive droplet & negative droplets) should be randomly distrubuted over a planar chip. This function verifies this assumption using chi-square or Monte Carlo test. Arrays with non-random patterns should be checked for integrity.

Value

A list of objects of class "htest" with the length equal to the number of plates (minimum 1).

Note

A similar result can be achived by using adpcr2ppp and quadrat.test. See Examples.

Author(s)

Adrian Baddeley, Rolf Turner, Michal Burdukiewcz, Stefan Roediger.

References

http://www.spatstat.org/

See Also

quadrat.test.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
many_panels <- sim_adpcr(m = 400, n = 765, times = 1000, pos_sums = FALSE, 
                   n_panels = 5)
test_panel(many_panels)

#test only one plate
test_panel(extract_run(many_panels, 3))

#do test_panel manually
require(spatstat)
ppp_data <- adpcr2ppp(many_panels)
lapply(ppp_data, function(single_panel) quadrat.test(single_panel))

dpcR documentation built on May 2, 2019, 7:04 a.m.