Changes in version 1.5.1 (2010-12-02)

Changed defaults 

    o   in secr.fit() the distribution fitted to counts now defaults to
    Poisson rather than Bernoulli (i.e. by default details$binomN = 0
    when detector(traps(capthist)) = 'count')
    o   plot.secr() confidence limits are computed only if requested
    explicitly ( default: limits = FALSE)
    o   the argument `buffer' in secr.fit() now defaults to NULL; a
    value of 100 is substituted if it is needed (i.e. neither mask nor
    buffer specified). This allows a warning to be given when the
    user relies on the default; it has no other effect.
    o   in secr.fit() the default detection parameter values when
    detectfn = 9 are now b0 = 2 and b1 = -0.1; this works for the
    dataset 'captdata', but in general you need to set 'start'.
    o   pdot() default 'detectpar' is now list(g0 = 0.2, sigma = 25, z =
    1) (consistent with sim.capthist())

Changed output

    o   the single value of 'esa' returned by derived() is now the
    harmonic mean (reciprocal of arithmetic mean of reciprocals)
    rather than the arithmetic mean, following a suggestion by David
    Borchers. This matters only when esa varies between individuals
    due to the inclusion of individual covariates in the detection
    model. Density estimates are unchanged.

New functions

    o   mask.check() evaluates the effect of varying buffer width and
    mask spacing on either the likelihood or density estimates from
    secr.fit(). This implements and extends the functionality of
    'Tools | ML SECR log likelihood' in Density 4.
    o   esa.plot() displays the effect of mask buffer width on effective
    sampling area (esa) for fixed values of detection
    parameters. Examine the asymptotic curve to choose a buffer width
    for model fitting. 
    o   suggest.buffer() proposes a buffer width to keep the
    buffer-related relative bias of D-hat within a bound
    o   detectpar() extracts the central estimates of detection function
    parameters from a fitted model as a list
    o   pdot.contour() display contours of the net probability of
    detection p.(X)
    o   buffer.contour() adds a conventional 'boundary strip' to a
    detector (trap) array, where the argument 'buffer' represents the
    strip width(s)
    o   utility functions polyarea() to calculate the area of a simple
    polygon and ms() to indicate whether an object has data from
    multiple sessions
    o   methods spacing.default() and 'spacing<-' to extract or replace
    mean detector spacing attribute of a 'traps' or 'mask' object (or compute if 
    NULL)
    o   methods AIC.secrlist(), plot.secrlist() and predict.secrlist()
    for lists of fitted models that have been assigned the class
    c('list','secrlist')
    o   method logLik.secr() for consistency with standard model fitting
    functions

New features in old functions

    o   closedN() now computes AICc model weights for models within dmax
    of the best model.
    o   new detection functions (7) 'cumulative lognormal' and (8)
    'cumulative gamma' are alternative 3-parameter functions. (8)
    lacks the heavy tail of (1) 'hazard rate'.
    o   pdot() uses compiled C code for ordinary detectors and is much faster 
    o   pdot() should now work for all detection functions 
    o   pdot() now takes account of incomplete 'usage' of detectors
    o   'covariates<-' now allows replacement of individual covariates in
    a multi-session capthist object (replacement value should be a list
    of dataframes)
    o   plot.mask() now handles multi-session masks
    o   detectfnplot() and attenuationplot() now allow the argument 'pars'
    to be a list from detectpar()
    o   make.mask() now clips a masks constructed by any method to a
    boundary polygon if one is provided (previously required type =
    'polygon')
    o   make.mask() and related functions now accept boundary polygons
    in the form of a SpatialPolygonsDataFrame object from 'sp'. This
    effectively adds support for ESRI shapefiles as readShapePoly() in
    the maptools package reads a shapefile and creates a
    SpatialPolygonsDataFrame object (see Examples in ?make.mask).
    Polygons in a shapefile may have multiple parts and/or holes.
    o   a new argument in make.mask() controls the saving or otherwise 
    of a boundary polygon (keep.mask)
    o   read.traps() has a new argument 'covnames' and can accept more
    than one covariate 
    o   read.capthist() has a new argument 'trapcovnames' that is passed
    to read.traps()
    o   read.capthist() has a new argument 'cutval' and can be used to
    input signal strength data. Detections with signal strength
    missing (NA) or below 'cutval' are discarded. Likewise in
    make.capthist().

Other

    o secr.fit() generates a warning when the 'buffer' appears to be
    too small (predicted RB(D-hat) > 0.01); applies only when 'mask'
    not specified.
    o   datasets now use 'lazy loading' so it is not necessary to call the
    data() function before referring to data objects
    o   the MASS and nlme packages have been shifted from Depends to
    Suggests; they are now loaded as required (for eqscplot() and
    fdHess()) 
    o   the utils package is added under Depends for its function
    packageVersion()
    o   the sp, maptools and gpclib packages are added under Suggests
    o   the warning from secr.fit() when the user relied on the default
    detectfn (0) has been suppressed
    o   substantial speed improvement in distancetotrap(), with benefits
    for several other functions
    o   output from secr.fit() now includes the actual call rather than
    the just call as a character string, and print.secr() has been modified
    to interpret call as a string (users should notice no difference)
    o   secr.fit() now gives an explicit error message when individual
    covariates appear in a full-likelihood model
    o   definition of compound halfnormal detection function changed to
    allow g(0) < 1, and now consistent with other functions
    o	tweaked documentation of sim.secr
    o	revised message for missing cutval in plot.secr and detectfnplot
    o	suppressed `spacing not computed' message in summary.traps
    o	documentation revised for detection functions, and tweaked for 
    secr.fit wrt binomN
    o	additions to vignette 'secr-datainput.pdf'
    o	plot.secr() and detectfnplot() streamlined internally, and now
    handle 'binary signal strength' function
    o   help pages for flip(), rotate(), shiftxy(), flip.traps(),
    rotate.traps() and shiftxy.traps() have been consolidated under
    'transformations'
    o   verify.capthist() no longer rejects negative counts (animal died)
    o   undocumented detectors 'quadratbinary' and 'quadratcount' removed
    o   cosmetic changes to many warning and error messages

Bugs fixed

    o	annular halfnormal detection function not working in sim.capthist()
    o   confusion between detection functions 3 & 4 in ip.secr(),
    plot.secr() and detectfnplot()
    o   read.traps() did not set the 'spacing' attribute    
    o   make.capthist() failed with 'polygon' detector when some points
    outside any polygon; now discards such points, with a warning, as
    originally intended
    o   read.traps() could fail reading usage fields from a trap layout file
    o   polyarea() could suffer from numeric overflow with integer
    coordinates, so coordinates now coerced to floating point (solved
    flow-on problem in summary.traps() with polygon detectors)
    o   esa() sometimes ignored incomplete detector usage
    o   sim.secr() failed with 'count' detector when traps object lacked a
    'binomN' attribute, and did not work with negative 'binomN'; now
    takes 'binomN' from 'details' of fitted secr object, default 0
    (Poisson).
    o   sim.secr() did not handle inhomogeneous Poisson density
    correctly, and could make excessive memory demands

Changes in version 1.4.1 (2010-08-29)

New functions
    o   empirical.varD() computes an estimate of the sampling error of a
    Horvitz-Thompson-like estimate of density for replicated spatial
    samples.  The formulation closely resembles that in conventional
    distance sampling with equal-length transects.

    o   moves() returns a list of the distances between consecutive
    detections for each animal in a capthist object (meaningful only
    for trap-like detectors, for which the sequence of detections is
    unambiguous).

    o   make.tri() generates a detector array based on a triangular grid
    and clip.hex() retains a hexagonal subset.

New features in old functions
    o   MS.capthist() now accepts any combination of single-session
    capthist objects, multi-session capthist objects, and lists of
    single-session capthist objects.

    o   sim.popn() now optionally generates a spatiotemporal population
    i.e. a list whose components form a time series of simple popn
    objects with mortality and recruitment and movement between
    times. Two new arguments are used (number.from and nsession);
    turnover parameters are passed as presently undocumented
    components of 'details'.

    o   sim.capthist now generates a multi-session capthist object when
    passed a list of populations (see preceding).

    o   sim.capthist now has an option to truncate detections beyond a
    fixed radius, regardless of the shape of the detection
    function. The radius is specified as component `truncate` in the
    `detectpar` argument. The default is no truncation (truncate =
    NULL).

    o   secr.fit() new automatic model effect 'Session' coded as 0:(R-1)
    where R is the number of sessions. Contrast with lower-case
    'session' which is a factor. Equivalent to manual sessioncov =
    data.frame(0:(R-1)); useful for modelling trend.

    o   secr.fit() new automatic covariates 'x2', 'y2','xy' for density
    trend models (defined for all points on habitat mask).

    o   new detection function = 6 'annular normal' has peak at distance
    +w where parameter w >= 0.

    o   Various functions with the argument 'detectfn' (secr.fit(),
    sim.capthist(), detectfnplot() etc.) now allow the name of the
    function to be supplied as a character value (e.g. 'halfnormal';
    see ?detectfn for names). Values are still stored as the integer
    codes.

    o	rbind.mask() now handles covariates rather than discarding them
    with a warning; rbind.traps() has been revised internally.

    o   read.capthist() and make.capthist() accept negative occasion
    numbers for death on capture even when detector type is not
    'single' or 'multi'.  Previously this coding was ignored because
    modelling of such data poses problems; responsibility now lies
    with the user.

Bugs fixed
    o   write.captures() and write.capthist() used row (animal) number
    rather than row names (animal identifiers) when detector='single'
    or detector='multi'. This has been rectified.

    o   write.captures() and write.capthist() when used with
    multi-session data lost the session names and exported all
    detections as session 1. Actual session names are now used to
    distinguish sessions in the output.

    o   sim.capthist() became confused when detectfn=3 or
    detectfn=4. Simulation with a compound halfnormal detection
    function (3) or uniform detection function (4) should now work.

    o   rbind.popn() returned with meaningless 'Ndist' and 'model2D'
    attributes. Now Ndist is set to 'user' and 'model2D' to the value
    for the first contributing population.

    o   secr.fit() with distribution = 'binomial' failed to calculate
    the asymptotic variance of D because it called the R function
    dbinom that takes only integer values for the size parameter
    (N). This call has been replaced by a local function that accepts
    non-integer N. The associated warning has been suppressed.

    o   rbind.traps() should now combine covariates and usage correctly.

    o   secr.make.newdata() failed with trend-over-occasion models (T),
    causing errors in predict.secr(), collate() and model.average(). 

Other
    o	Displays startup message (see .onAttach)

    o   Minor improvements to documentation (alias for detectfn, all
    data objects documented etc.)

    o	details$binomN argument of secr.fit has been documented. binomN is
    used to specify the discrete distribution fitted to count data
    (binomial, Poisson etc.), and the size parameter of the binomial.

    o   print.mask() has been dropped as print.dataframe() works
    perfectly well with masks.


Changes in version 1.4.0 (2010-05-07)

New functions
    o	write.capthist() exports capthist object as DENSITY text files.
    o	read.capthist() imports capthist object from DENSITY text files.
    o	write.SPACECAP() exports capthist object and mask as SPACECAP
    text files.
    o	read.SPACECAP() imports capthist object and mask from SPACECAP
    text files.
    o	write.captures() has been renamed from write.capthist.
    o	closedN() computes various closed population estimators.
    o	closure.test() tests for population closure of Otis et al.
    (1978) and Stanley & Burnham (1999).
    o	MMDM() computes observed (trap-revealed) range length (Otis et
    al. 1978).
    o	ARL() computes asympototic range length (Jett & Nichols 1987).
    o	logmultinom() computes the multinomial coefficient of the SECR
    likelihood (internal function, now exported).

New datasets
    o	'skink' lizard pitfall trapping (Efford, Thomas & Spencer unpubl)
    o	'stoatDNA' stoat microsatellites (Efford, Borchers & Byrom 2009)
    o	'housemouse' Coulombe Mus musculus (Otis et al. 1978)
    o	'deermouse' Reid Peromyscus (Otis et al. 1978)

New features in old functions
    o	make.capthist() now sorts rows numerically if all values of
    animalID are valid numbers.
    o	make.capthist() now checks for missing values.
    o	make.capthist() places multi-session capture data in order by
    session before matching 'traps' objects.
    o	print.capthist() now sorts rows numerically if all values of
    animalID are valid numbers.
    o	make.grid() has a new option for labeling detectors "xy".
    o	secr.fit() has a new 'details' option to centre trap and mask
    coordinates; this can solve some numerical problems fitting
    coordinates with large absolute values.
    o	plot.mask() produces more attractive images and does not call
    image(), but is somewhat slower.
    o	read.mask() has been tweaked to allow import from csv format as
    used by SPACECAP.

Defunct
    o	read.captures() has been ditched - use read.table() instead.

Bugs fixed
    o	A bug in 'traps<-' has been fixed; replacement of traps for
    multiple sessions should now work.

Other
    o	Dataset 'secrdemo' now incorporates 'rawdata' and 'captdata'.
    o	Example text files 'capt.txt,'trap.txt','stoatcapt.txt',and
    'stoattrap.txt' are provided in the package installation folder
    'extdata' (e.g. setwd(system.file('extdata', package = 'secr'))).
    o	New vignette: secr-datainput.pdf
    o	Revised vignette: secr-overview.pdf


Changes in version 1.3.0 (2010-03-11)

New functions
    o	ellipse.secr() computes and plots confidence ellipses of
    fitted parameters.
    o	LLsurface.secr() plots log-likelihood surface of SECR model
    for 2 dimensions at a time.
    o	attenuationplot() plots the sound attenuation function from
    an acoustic SECR model.

New datasets
    o	ovensong - new acoustic dataset (Dawson & Efford J Appl Ecol;
    see also 'secr-sound.pdf')

New features in old functions
    o	The handling of structural relationships in secr.fit() with
    scaleg0 and scalesigma has been improved.
    o	The 'start' argument of secr.fit() may now be a previously
    fitted nested model.
    o	The default algorithm for initial values in secr.fit() now
    uses 'RPSV' instead of 'dbar' for spatial scale.
    o	secr.fit() has a new pre-defined covariate term T for time
    trend in detection parameter model formulae.

Other
    o	New detector types 'count', 'signal' ('polygon' and
    'transect' are present but should be treated as 'under
     development')
    o	New detection functions 'binary signal strength', 'signal
    strength', 'signal strength spherical'
    o	Finite mixture models for heterogeneity in detection
    parameters (use 'h2' in model formula)
    o	New vignettes: secr-overview.pdf, secr-sound.pdf,
    secr-finitemixtures.pdf

