## NAME

s.cellstats - Univariate statistics for a GRASS sites list within cells.
(GRASS Sites Program)

## SYNOPSIS

s.cellstats
s.cellstats help
s.cellstats [-q] input=name [output=name] [field=value] [min=value] [stats=stat[,stat,...]]

## DESCRIPTION

s.cellstats calculates univariate statistics of sites lists for each cluster of input sites falling within each cell of the current region. This includes the number of sites, mean, standard deviation, coefficient of variation, mininum, first quartile, median, third quartile, and maximum. The output is a sites list where the coordinates are cell centers, the category is the count of sites falling within the cell, and the decimal attributes are the statistics. Sites falling outside the current region are discarded.

## OPTIONS

### Flags:

-q
  Quiet. Turn off informational messages.

  ### Parameters:

  input=name
    Name of an existing sites file.
  output=name
    Name of the output sites file. If not specified, the program writes to standard output.
  field=value
    Decimal attribute to use for calculation
    default: 1
  min=value
    Set a minimum sample size per cell. If there are fewer than value sites found for a given cell, statistics are not calculated for that cell.
    default: 1
  stats=stat[,stat,...]
    Specify which statistics should be reported. Statistics will be reported in the order specified, otherwise they are output in the order below. The statistics are:
    m - mean
    s - standard deviation
    cv - coefficient of variation
    skw - skewness
    kur - kurtosis
    mse - mean of squares
    mav - mean of absolute values
    min - minimum
    q1 - first quartile
    med - median
    q3 - third quartile
    max - maximum

  ## SEE ALSO

  s.univar, s.windavg, s.normal, r.univar

  ## NOTES

  Requires at least 16 bytes of memory per input site plus some other overhead. Very large input sites files may cause excessive swap file usage or cause the program to fail with an out of memory error.

  Certain statistics are invalid when calculated for a single site. These statistics are the standard deviation, coefficient of variation, skewness and kurtosis. The min parameter may be used to insure the sample size is large enough to approximate normality. Additionally, the cell size for the current region may be enlarged to capture more sites per cell. No test for normality is performed on the input and some statistics may not be valid if normality is violated.

  ## BUGS

  None known.

  Please send all bug fixes and comments to the grass development team.
  `http://grass.itc.it`.

  ## AUTHOR

  Eric G. Miller, adapted from s.univar written by James Darrell McCauley <darrell@mccauley-usa.com>, when he was at Agricultural Engineering, Purdue University

  Last changed: $Date: 2003/02/09 12:02:43 $