FAQ                   package:secr                   R Documentation

_F_r_e_q_u_e_n_t_l_y _A_s_k_e_d _Q_u_e_s_t_i_o_n_s, _A_n_d _O_t_h_e_r_s

_D_e_s_c_r_i_p_t_i_o_n:

     A place for hints and miscellaneous advice.

_H_o_w _d_o _I _i_n_s_t_a_l_l _s_e_c_r?:

     Under Windows, it is simplest to install the package binary from
     the Rgui. Save the file secr_1.3.x.zip to a local folder and use
     the menu option "Packages | Install packages(s) from local zip
     files...".

     For other systems (see below) you will need to install the source
     package secr_1.3.x.tar.gz. 

     Whatever your system, you also need to get the package 'abind'
     (use Packages | Install package(s)... to download from CRAN).
     Other required packages ('MASS', 'nlme', 'stats') should be
     available as part of your R installation.

_D_o_e_s _s_e_c_r _w_o_r_k _o_n _o_p_e_r_a_t_i_n_g _s_y_s_t_e_m_s _o_t_h_e_r _t_h_a_n _W_i_n_d_o_w_s?:

     Yes, at least in theory. From version 1.2.8 you should be able to
     install the source package secr_1.x.x.tar.gz if you have the
     necessary tools (check the 'R Installation and Administration'
     manual or the 'R for Mac OS X FAQ' on CRAN for help on installing
     source packages). Thanks to Ray Brownrigg and Joanne Potts for
     vital assistance. I would be glad to hear of successful
     installations on non-Windows systems (particularly if anyone
     produces a binary for Mac OS).

_H_o_w _c_a_n _I _g_e_t _h_e_l_p?:

     There are three general ways of displaying documentation from
     within R. Firstly, you can bring up help pages for particular
     functions from the command prompt.  For example:

     '? secr.fit'

     Secondly, help.search() lets you ask for a list of the help pages
     on a vague topic. From R version 2.8.0 you can use just ??.  For
     example:

     '?? 'linear models''

     Thirdly, you can display various documents:

     'RShowDoc ('secr-manual', package='secr')'

     'RShowDoc ('secr-overview', package='secr')'

     See below for more R tips.

_H_o_w _s_h_o_u_l_d _I _r_e_p_o_r_t _a _p_r_o_b_l_e_m?:

     If you get really stuck or find something you think is a bug then
     please report the problem. For the moment, the correct address is
     density.software@otago.ac.nz. 

     When reporting problems please send an actual dataset (ideally,
     the simplest one that exhibits the problem). Use 'save' to wrap
     several R objects together in one .RData file, e.g.,
     'save('captdata', 'secrdemo.0', 'secrdemo.b', file =
     'mydata.RData')'. Also, paste the output from
     'packageDescription("secr")' into the text of your message.

     Needless to say, we cannot promise to solve all problems.

_W_h_y _d_o _I _g_e_t _d_i_f_f_e_r_e_n_t _a_n_s_w_e_r_s _f_r_o_m _s_e_c_r _a_n_d _D_e_n_s_i_t_y?:

     Strictly speaking, this should not happen if you have specified
     the same model and likelihood, although you may see a little
     variation due to the different maximization algorithms.
     Likelihoods (and estimates) may differ if you use different
     integration meshes (habitat masks), which can easily happen
     because the programs differ in how they set up the mesh.  If you
     want to make a precise comparison, save the Density mesh to a file
     and read it into 'secr', or vice versa.

     Extreme data, especially rare long-distance movements, may be
     handled differently by the two programs. The 'minprob' component
     of the 'details' argument of 'secr.fit' sets a threshold of
     probability for capture histories (smaller values are all set to
     minprob), whereas Density has no explicit limit. In the current
     version the default minprob has been reduced from 1e-20 to 1e-50.
     If you find a discrepancy with Density it may be worth lowering
     minprob even further.

_H_o_w _c_a_n _I _s_p_e_e_d _u_p _m_o_d_e_l _f_i_t_t_i_n_g _a_n_d _m_o_d_e_l _s_e_l_e_c_t_i_o_n?:

     If you don't need to model variation in density over space or time
     then consider maximizing the conditional likelihood in 'secr.fit'
     (CL = TRUE). This reduces the complexity of the optimization
     problem, especially where there are several sessions and you want
     session-specific density estimates (by default, 'derived' returns
     a separate estimate for each session even if the detection
     parameters are constant across sessions).

     Check the extent and spacing of the habitat mask that you are
     using. Execution time is roughly proportional to the number of
     mask points. Default settings can lead to very large masks for
     detector arrays that are elongated 'north-south' because the
     number of points in the east-west direction is fixed. Compare
     results with a much sparser mask (e.g., nx=32 instead of nx=64).

     Do you really need to fit that complex model? Chasing down small
     decrements in AIC is so last-century. Remember that detection
     parameters are mostly nuisance parameters, and models with big
     differences in AIC may barely differ in their density estimates.
     This is a good topic for further research - we seem to need a
     'focussed information criterion' (Claeskens and Hjort 2008) to
     discern the differences that matter. 

     Use 'score.test' to compare nested models. At each stage this
     requires only the more simple model to have been fitted in full;
     further processing is required to obtain a numerical estimate of
     the gradient of the likelihood surface for the more complex model,
     but this is much faster than maximizing the likelihood.

_W_i_l_l _s_e_c_r _s_o_o_n _i_n_c_l_u_d_e _f_e_a_t_u_r_e _X?:



     _F_i_n_i_t_e _m_i_x_t_u_r_e _m_o_d_e_l_s Possibly. Mixture models do seem desirable
          as an option to allow for unmodelled heterogeneity. However,
          mixtures add an extra level of complexity across the entire
          detection model structure, and an additional 'real' parameter
          (for the mixing proportion) so the decision is not trivial. 
          A decision was made to release and evaluate 'secr' 1.3 before
          adding even more complexity.

     _I_n_v_e_r_s_e _p_r_e_d_i_c_t_i_o_n Yes, from version 1.2.7.  Fitting SECR models
          by simulation and inverse prediction is still the only
          rigorous method for dealing with data from single-catch
          traps.  However, maximizing the likelihood as if the data
          came from multi-catch traps yields fairly good density
          estimates even with single-catch data (estimates of detection
          g0 are biased).  Limited capability for simulation-based
          fitting is provided by the function 'ip.secr'.  It is not
          intended to extend 'ip.secr' to include a wider range of
          models. 


_T_h_i_n_g_s _Y_o_u _M_i_g_h_t _N_e_e_d _T_o _K_n_o_w _A_b_o_u_t _R:

     The function 'findFn' in package 'sos' lets you search CRAN for R
     functions by matching text in their documentation.

     There is now a vast amount of R advice available on the web. For
     the terminally frustrated, 'R inferno' by Patrick Burns is
     recommended (<URL: www.burns-stat.com/pages/Tutor/R_inferno.pdf>).
     "If you are using R and you think you're in hell, this is a map
     for you".

     Method functions for S3 classes cannot be listed in the usual way
     by typing the function name at the R prompt because they are
     'hidden' in a namespace. Get around this with getAnywhere(). For
     example: 

     'getAnywhere(print.secr)'

     R objects have 'attributes' that usually are kept out of sight.
     Important attributes are 'class' (all objects), 'dim' (matrices
     and arrays) and 'names' (lists). 'secr' hides quite a lot of
     useful data as named 'attributes'. Usually you will use summary
     and extraction methods ('traps', 'covariates', 'usage' etc.) to
     view and change the attributes of the various classes of object in
     'secr'. If you're curious, you can reveal the lot with
     'attributes'.  For example:

     'data(captdata)'

     'traps(captdata)       ## extraction method for 'traps''

     'attributes(captdata)  ## all attributes'

_A_u_t_h_o_r(_s):

     Murray Efford murray.efford@otago.ac.nz

_R_e_f_e_r_e_n_c_e_s:

     Claeskens, G. and Hjort N. L. (2008) _Model Selection and Model
     Averaging_. Cambridge: Cambridge University Press.

