# envelope.ppmlasso: Calculates simulation envelopes for goodness-of-fit In ppmlasso: Point Process Models with LASSO Penalties

## Description

This function is analogous to the envelope function of the spatstat package.

## Usage

 1 2 ## S3 method for class 'ppmlasso' envelope(Y, fun = Kest, ...)

## Arguments

 Y A fitted regularisation path of point process models. The simulation envelopes will be calculated for the model that optimises the given criterion. fun The summary function to be computed for the given point process model. See the help file for the envelope function of the spatstat package for more details. ... Other arguments for producing diagnostic plots, as given by the envelope function of the spatstat package.

## Details

See the help file for envelope in the spatstat package for further details of simulation envelopes.

Ian W. Renner

## References

Baddeley, A.J. & Turner, R. (2005). Spatstat: an R package for analyzing spatial point patterns. Journal of Statistical Software 12, 1-42.

diagnose.ppmlasso, for residual plots inherited from spatstat.

## Examples

 1 2 3 4 5 6 data(BlueMountains) sub.env = BlueMountains\$env[BlueMountains\$env\$Y > 6270 & BlueMountains\$env\$X > 300,] sub.euc = BlueMountains\$eucalypt[BlueMountains\$eucalypt\$Y > 6270 & BlueMountains\$eucalypt\$X > 300,] ppm.form = ~ poly(FC, TMP_MIN, TMP_MAX, RAIN_ANN, degree=2) + poly(D_MAIN_RDS, D_URBAN, degree=2) ppm.fit = ppmlasso(ppm.form, sp.xy = sub.euc, env.grid = sub.env, sp.scale = 1, n.fits = 20) envelope(ppm.fit, Kinhom, nsim = 20)

### Example output

spatstat 1.52-1       (nickname: 'Apophenia')
For an introduction to spatstat, type 'beginner'

Note: R version 3.4.1 (2017-06-30) is more than 9 months old; we strongly recommend upgrading to the latest version
Calculating species environmental data for variable: FC
Calculating species environmental data for variable: D_MAIN_RDS
Calculating species environmental data for variable: D_URBAN
Calculating species environmental data for variable: RAIN_ANN
Calculating species environmental data for variable: TMP_MAX
Calculating species environmental data for variable: TMP_MIN
[1] "Output saved in the file SpEnvData.RData"
[1] "Output saved in the file TestPPM.RData"
Fitting Models: 1 of 20
Fitting Models: 2 of 20
Fitting Models: 3 of 20
Fitting Models: 4 of 20
Fitting Models: 5 of 20
Fitting Models: 6 of 20
Fitting Models: 7 of 20
Fitting Models: 8 of 20
Fitting Models: 9 of 20
Fitting Models: 10 of 20
Fitting Models: 11 of 20
Fitting Models: 12 of 20
Fitting Models: 13 of 20
Fitting Models: 14 of 20
Fitting Models: 15 of 20
Fitting Models: 16 of 20
Fitting Models: 17 of 20
Fitting Models: 18 of 20
Fitting Models: 19 of 20
Fitting Models: 20 of 20
Generating 20 simulated realisations of fitted Poisson model  ...
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,  20.

Done.
Pointwise critical envelopes for K[inhom](r)
and observed value for 'fit.ss'
Edge correction: "trans"
Obtained from 20 simulations of fitted Poisson model
Alternative: two.sided
Significance level of pointwise Monte Carlo test: 2/21 = 0.0952
................................................................................
Math.label
r     r
obs   {hat(K)[inhom]^{obs}}(r)
mmean {bar(K)[inhom]}(r)
lo    {hat(K)[inhom]^{lo}}(r)
hi    {hat(K)[inhom]^{hi}}(r)
Description
r     distance argument r
obs   observed value of K[inhom](r) for data pattern
mmean sample mean of K[inhom](r) from simulations
lo    lower pointwise envelope of K[inhom](r) from simulations
hi    upper pointwise envelope of K[inhom](r) from simulations
................................................................................
Default plot formula:  .~r
where "." stands for 'obs', 'mmean', 'hi', 'lo'
Columns 'lo' and 'hi' will be plotted as shading (by default)
Recommended range of argument r: [0, 17.5]
Available range of argument r: [0, 17.5]
Warning messages:
1: 'newdata' had 4316 rows but variables found have 4519 rows
2: In v[!is.na(v)] <- value :
number of items to replace is not a multiple of replacement length

ppmlasso documentation built on May 2, 2019, 8:20 a.m.