calc_sde: Calculate the Standard Deviation Ellipse

calc_sdeR Documentation

Calculate 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, centre.xy=NULL, calccentre=TRUE,
weighted=FALSE, weights=NULL, points=NULL, verbose=FALSE)

Arguments

id

A unique integer to identify the shape

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

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

Details

Use the LOCATIONS element in the output list object along with the ATTRIBUTES elements can be used to produce shapefiles or other vector point files for geographic data.

Value

The returned result is a list:

TYPE

The type of calculation results stored in the object: BOX, SDD, SDE, CMD, CF, or CF2PTS, MNC, MDC

DATE

The date and time that the function was run

ID

Identifier for the SDE shape - it should be unique

LOCATIONS

Locations pertinent for the SDE that can be used with ATTRIBUTES if wishing to build a vector point file for geographic data outside of this pacakge.

FORPLOTTING

Coordinates and identifiers used for plotting by plot_sde()

ATTRIBUTES

Attributes for the output SDE that can be used with LOCATIONS coordinates if wishing to build a vector point file for geographic data outside of this package.

id

Identifier for the SDE shape - it should be unique

calccentre

Boolean: TRUE if mean centre is computed

weighted

Boolean: TRUE if the weighted mean centre is to be used instead

CENTRE.x

X-coordinate of the centre

CENTRE.y

Y-coordinate of the centre

Sigma.x

Half-length of axis along x-axis

Sigma.y

Half-length of axis along y-axis

Major

String indicating which axis is the major elliptical axis

Minor

String indicating which axis is the minor elliptical axis

Theta

Rotation angle in degrees

Eccentricity

A measure of eccentricity (i.e., the flatness of the ellipse)

Area.sde

Area of the SDE

TanTheta

Trigonometric result

SinTheta

Trigonometric result

CosTheta

Trigonometric result

SinThetaCosTheta

Trigonometric result

Sin2Theta

Trigonometric result

Cos2Theta

Trigonometric result

ThetaCorr

Corrected theta angle for rotation of major axis from north

Note

Results specific for plotting are stored in the FORPLOTTING element within the produced list object. Pass the entire object to plot_box() and the function automatically extracts this information. This function can be used on its own (once) or repetitively in a loop to process grouped point data stored in a larger table. When used repetitively, be sure to increment the id argument to ensure that each SDE has a unique identifier.

Author(s)

Tarmo K. Remmel, Randy Bui, Ron N. Buliung

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

calc_box, calc_sde, calc_cmd, calc_cf, calc_cf2pts, calc_mnc, calc_mdc, gridpts

Examples

# SDE EXAMPLE
data(activities)
a <- calc_sde(id=1, centre.xy=NULL, points=activities)
str(a)
print(a)

# IF THE RESULT OF THIS FUNCTION IS STORED TO AN OBJECT, THE plot_sde()
# FUNCTION WILL TAKE THAT OBJECT AS INPUT FOR PLOTTING VIA THE datin ARGUMENT

# SDE TO SHAPEFILE EXAMPLE (REMOVE THE COMMENTS TO RUN)
# shp <- convert.to.shapefile(a$LOCATIONS, a$ATTRIBUTES, "id", 5)
# write.shapefile(shp, "SDE_Shape", arcgis=T)

aspace documentation built on May 29, 2024, 2:04 a.m.

Related to calc_sde in aspace...