Learn R Programming

aspace (version 2.5)

calc_sde: Calculating the Standard Deviation Ellipse

Description

This function computes the Standard Deviation Ellipse (SDE) from a set of points. The SDE is a centrographic measure used to characterize the dispersion of point observations along two orthogonal axes. The SDE also captures directional bias in a spatial point pattern, the ellipse will be oriented in the direction of maximum dispersion.

Usage

calc_sde(id=1, filename="SDE_Output.txt", centre.xy=NULL, calccentre=TRUE, 
weighted=FALSE, weights=NULL, CMD.npts=10000, points=activities, verbose=FALSE)

Arguments

id
A unique integer to identify the shape
filename
A string indicating the ASCII textfile where shape coordinates will be written
centre.xy
A vector of length 2, containing the x- and y-coordinates of the SDE centre (Planar Coordinates Only!)
calccentre
Boolean: Set to TRUE if the mean center is to be calculated
weighted
Boolean: Set to TRUE if the weighted mean center is to be computed with weighted coordinates
weights
Weights applied to point observations, number of weights should equal the number of observations
CMD.npts
The approximate number of points to generate for the centre of minimum distance (CMD) calculation
points
A 2-column matrix or data frame containing point coordinates
verbose
Boolean: Set to TRUE if extensive feedback is desired on the standard output

Value

  • The returned result is a list:
  • idIdentifier for the SDE shape - it should be unique
  • calccentreBoolean: TRUE if mean centre is computed
  • weightedBoolean: TRUE if the weighted mean centre is to be used instead
  • CENTRE.xX-coordinate of the centre
  • CENTRE.yY-coordinate of the centre
  • Sigma.xHalf-length of axis along x-axis
  • Sigma.yHalf-length of axis along y-axis
  • MajorString indicating which axis is the major elliptical axis
  • MinorString indicating which axis is the minor elliptical axis
  • ThetaRotation angle in degrees
  • EccentricityA measure of eccentricity (i.e., the flatness of the ellipse)
  • Area.sdeArea of the SDE
  • TanThetaTrigonometric result
  • SinThetaTrigonometric result
  • CosThetaTrigonometric result
  • SinThetaCosThetaTrigonometric result
  • Sin2ThetaTrigonometric result
  • Cos2ThetaTrigonometric result
  • ThetaCorrCorrected theta angle for rotation of major axis from north
  • central.xX-coordinate of the identified central feature
  • central.yY-coordinate of the identified central feature
  • median.xX-coordinate of median centre, median value of the X-coordinate vector
  • median.yY-coordinate of median centre, median value of the Y-coordinate vector
  • CMD.xX-coordinate of estimated centre of minimum distance
  • CMD.yY-coordinate of estimated centre of minimum distance

Details

This function is most powerful when used repetitively within a loop to compute the SDE for subsets of points stored in a large data table.

References

See chapter 4 of the documentation manual for CrimeStat at http://www.icpsr.umich.edu/CRIMESTAT/ and Ebdon, D. 1987. Statistics in geography. 2nd edition. New York, NY Basil Blackwell Ltd. 232 p.

See Also

plot_sde, calc_sdd, calc_mcp, calc_box makeshapes, mcp, gridpts, ellipse3

Examples

Run this code
calc_sde(id=1, filename="SDE_Output.txt", centre.xy=NULL, calccentre=TRUE, 
weighted=FALSE, weights=NULL, CMD.npts=10000, points=activities, verbose=TRUE)

Run the code above in your browser using DataLab