## NAME

m.svfit - Semivariogram model fitting.
(GRASS Data Import/Processing Program)

## SYNOPSIS

m.svfit
m.svfit help
m.svfit [-pqw] [input=name] model=value range=value [graph=name]

## DESCRIPTION

m.svfit calculates a sample semivariogram and either plots it using gnuplot or writes the estimated parameters to standard output, or both.

For more information, refer to the tutorial or see the example below.

## OPTIONS

### Flags:

-q
  Quiet. Cut out the chatter.
-p
  Plot model and sample semivariogram (requires gnuplot).
-w
  Use weighted least squares (default is general least squares)

### Parameters:

sites=name
  UNIX file containing sample semivariogram (see NOTES). Default is standard input.
model=value
  Integer Model Index, one of
  1. Linear,
  2. Spherical,
  3. Exponential,
  4. Gaussian,
  5. Quadratic, or
  6. Wave or Hole Effect.
range=value
  Range of semivariogram.
graph=name
  Basename to save graphing data/commands files. Graphs are saved in the current working directory with the extensions `.gp` and `.dat`. Implies the -p flag.

  ## NOTES

  Three columns of data are expected as input: lag distance (h), semivariogram value (gamma), and the number of data pairs used to compute it (N(h)). This may either be from a UNIX file, entered from the command line (terminated by control-d), or via a pipe or redirection.

  The plotting program can be selected by setting the environment variable GRASS_GNUPLOT .

  ## EXAMPLE

  m.svfit was designed to be used in conjunction with s.sv, a GRASS sites program for calculating sample semivariograms. The following example calculates a sample semivariogram of the sites list wells with a nominal lag distance of 5 and then fits a linear model with a range of 100. The sample semivariogram and model are plotted using gnuplot and the graphing instructions and data are saved to files with the basename svwells in the current working directory:
    s.sv -q wells lag=5 | m.svfit -p m=1 r=100 g=svwells
  By saving the graphing instructions and data, the semivariogram may be plotted again later by the following command:
    gnuplot svwells.gp

  ## SEE ALSO

  s.univar, s.normal, s.sv gnuplot and

  Semivariogram Modeling - A GRASS Tutorial on Exploratory Data Analysis and Semivariogram Modeling.

  ## BUGS

  Please send all bug fixes and comments to the author.

  ## AUTHOR

  James Darrell McCauley, Agricultural Engineering, Purdue University

  Last changed: $Date: 2002/01/25 05:45:33 $