Description Usage Arguments Details Value See Also Examples

Wrapper function for fitting crawl::crwMLE models and predicting locations with crawl::crwPredict for multiple individuals.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | ```
crawlWrap(
obsData,
timeStep = 1,
ncores = 1,
retryFits = 0,
retrySD = 1,
retryParallel = FALSE,
mov.model = ~1,
err.model = NULL,
activity = NULL,
drift = NULL,
coord = c("x", "y"),
proj = NULL,
Time.name = "time",
time.scale = "hours",
theta,
fixPar,
method = "L-BFGS-B",
control = NULL,
constr = NULL,
prior = NULL,
need.hess = TRUE,
initialSANN = list(maxit = 200),
attempts = 1,
predTime = NULL,
fillCols = FALSE,
coordLevel = NULL,
...
)
``` |

`obsData` |
data.frame object containing fields for animal ID ('ID'), time of observation (identified by |

`timeStep` |
Length of the time step at which to predict regular locations from the fitted model. Unless |

`ncores` |
Number of cores to use for parallel processing. Default: 1 (no parallel processing). |

`retryFits` |
Number of times to attempt to achieve convergence and valid (i.e., not NaN) variance estimates after the initial model fit. |

`retrySD` |
An optional list of scalars or vectors for each individual indicating the standard deviation to use for normal perturbations of |

`retryParallel` |
Logical indicating whether or not to perform |

`mov.model` |
List of mov.model objects (see |

`err.model` |
List of err.model objects (see |

`activity` |
List of activity objects (see |

`drift` |
List of drift objects (see |

`coord` |
A 2-vector of character values giving the names of the "x" and
"y" coordinates in |

`proj` |
A list of valid epsg integer codes or proj4string for |

`Time.name` |
Character indicating name of the location time column. See |

`time.scale` |
character. Scale for conversion of POSIX time to numeric for modeling. Defaults to "hours". |

`theta` |
List of theta objects (see |

`fixPar` |
List of fixPar objects (see |

`method` |
Optimization method that is passed to |

`control` |
Control list which is passed to |

`constr` |
List of constr objects (see |

`prior` |
List of prior objects (see |

`need.hess` |
A logical value which decides whether or not to evaluate the Hessian for parameter standard errors |

`initialSANN` |
Control list for |

`attempts` |
The number of times likelihood optimization will be
attempted in cases where the fit does not converge or is otherwise non-valid. Note this is not the same as |

`predTime` |
List of predTime objects (see |

`fillCols` |
Logical indicating whether or not to use the crawl:: |

`coordLevel` |
Character string indicating the level of the hierarchy for the location data. Ignored unless |

`...` |
Additional arguments that are ignored. |

Consult

`crwMLE`

and`crwPredict`

for futher details about model fitting and prediction.Note that the names of the list elements corresponding to each individual in

`mov.model`

,`err.model`

,`activity`

,`drift`

,`theta`

,`fixPar`

,`constr`

,`prior`

, and`predTime`

must match the individual IDs in`obsData`

. If only one element is provided for any of these arguments, then the same element will be applied to all individuals.

A `crwData`

or `crwHierData`

object, i.e. a list of:

`crwFits` |
A list of |

`crwPredict` |
A |

The `crwData`

object is used in `MIfitHMM`

analyses that account for temporal irregularity or location measurement error.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ```
## Not run:
# extract simulated obsData from example data
obsData <- miExample$obsData
# error ellipse model
err.model <- list(x= ~ ln.sd.x - 1, y = ~ ln.sd.y - 1, rho = ~ error.corr)
# Fit crwMLE models to obsData and predict locations
# at default intervals for both individuals
crwOut1 <- crawlWrap(obsData=obsData,
theta=c(4,0),fixPar=c(1,1,NA,NA),
err.model=err.model,attempts=100)
# Fit the same crwMLE models and predict locations
# at same intervals but specify for each individual using lists
crwOut2 <- crawlWrap(obsData=obsData,
theta=list(c(4,0),c(4,0)), fixPar=list(c(1,1,NA,NA),c(1,1,NA,NA)),
err.model=list(err.model,err.model),
predTime=list('1'=seq(1,633),'2'=seq(1,686)))
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.