Description Usage Arguments Details Value Note Author(s) References See Also Examples

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.

1 2 |

`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 |

`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 |

Use the sdeloc (coordinates) and sdeatt(attributes) to produce shapefiles using the convert.to.shapefile and write.shapefile from the shapefiles library

The returned result is a list:

`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 |

Results are stored in the r.SDE object (required for plot_sde). 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 parameter to ensure that each SDE has a unique identifier. The output ASCII coordinate file can be further processed using the shapefiles package to generate an ESRI Shapefile for SDE polygons..

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

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.

`plot_sde`

, `calc_sdd`

,
`calc_box`

,`gridpts`

1 2 3 4 5 6 7 8 9 | ```
## SDE example
calc_sde(id=1, filename="SDE_Output.txt", centre.xy=NULL, calccentre=TRUE,
weighted=FALSE, weights=NULL, points=activities, verbose=FALSE)
## plot_sde by default takes as input the result produced from the calc_sde, read from the current workspace.
## SDE to shapefile example (exclude the comments below to run script)
## shp <- convert.to.shapefile(sdeloc,sdeatt,"id",5)
## write.shapefile(shp, "SDE_Shape", arcgis=T)
``` |

```
Loading required package: splancs
Loading required package: sp
Spatial Point Pattern Analysis Code in S-Plus
Version 2 - Spatial and Space-Time analysis
Loading required package: Hmisc
Loading required package: lattice
Loading required package: survival
Loading required package: Formula
Loading required package: ggplot2
Attaching package: 'Hmisc'
The following object is masked from 'package:splancs':
zoom
The following objects are masked from 'package:base':
format.pval, round.POSIXt, trunc.POSIXt, units
Loading required package: shapefiles
Loading required package: foreign
Attaching package: 'shapefiles'
The following objects are masked from 'package:foreign':
read.dbf, write.dbf
$id
[1] 1
$CALCCENTRE
[1] TRUE
$weighted
[1] FALSE
$CENTRE.x
[1] 610941.3
$CENTRE.y
[1] 4830837
$Sigma.x
[1] 3602.822
$Sigma.y
[1] 10900.55
$Major
[1] "SigmaY"
$Minor
[1] "SigmaX"
$Theta
[1] 52.4399
$Eccentricity
[1] 0.9437999
$Area.sde
[1] 123378936
$TanTheta
[1] 1.300399
$SinTheta
[1] 0.7927144
$CosTheta
[1] 0.6095933
$SinThetaCosTheta
[1] 0.4832333
$Sin2Theta
[1] 0.6283961
$Cos2Theta
[1] 0.3716039
$ThetaCorr
[1] 52.4399
```

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.