# findres: Choose spatial resolution for analysis In ppmlasso: Point Process Models with LASSO Penalties

## Description

This function produces a plot to choose the optimal spatial resolution for analysis. A point process model is calculated for each nominated spatial resolution and the log-likelihood of all fitted models are plotted against the spatial resolutions.

## Usage

 `1` ```findres(scales, lambda = 0, coord = c("X", "Y"), sp.xy, env.grid, formula, ...) ```

## Arguments

 `scales` A vector of spatial resolutions for which to produce the plot. `lambda` The LASSO penalty for each fitted spatial resolution. This should be a single value such that only one point process model is computed for each spatial resolution. `coord` A vector containing the names of the longitude and latitude coordinates, used by `env.var`. `sp.xy` A matrix of species locations containing at least one column representing longitude and one column representing latitude, as in `ppmlasso`. `env.grid` The geo-referenced matrix of environmental grids, as in `ppmlasso`. `formula` The formula of the fitted model, as in `ppmlasso`. `...` Further arguments passed to `ppmlasso`.

## Value

A plot of log-likelihood versus spatial resolution.

Ian W. Renner

## 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,] scales = c(0.5, 1, 2, 4, 8, 16) ppm.form = ~ poly(FC, TMP_MIN, TMP_MAX, RAIN_ANN, degree=2) findres(scales, formula = ppm.form, sp.xy = sub.euc, env.grid = sub.env) ```

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