LSCV.density(data, hlim = NULL, res = 128, edge = TRUE,
WIN = NULL, quick = TRUE, comment = TRUE)data.frame, list, matrix, or ppp descrNULL (default), the function attempts to automatically select an appropriate range based on multiples of StoyanTRUE.owin object giving the study region. Ignored if data is already a ppp.object.TRUE. Setting quick = FALSE forces the function to individually evaluate the CV objective function at each of seq(hlim[1], hlim[2], length = 50)TRUE.quick = FALSE, this value is named hopt; additionally returned are the objective function values (lscv) and the index of the minimum value (ind)). The user may need to experiment with adjusting hlim to find a suitable minimum.data argument is a data.frame or a matrix, this must have exactly two columns containing the x ([,1]) and y ([,2]) data values. Should data be a list, this must have two vector components of equal length named x and y. Alternatively, data may be an object of class ppp (see ppp.object).spatstat's function bw.relriskdata(PBC)
##PBC cases
LSCV.density(split(PBC)[[1]],hlim=c(10,400))
##PBC controls
LSCV.density(split(PBC)[[2]],hlim=c(10,400))Run the code above in your browser using DataLab