Exercise

# Variogram model fitting

Next you'll fit a model to your variogram. The `gstat`

function `fit.variogram()`

does this. You need
to give it some initial values as a starting point for the optimization algorithm to fit a better model.

The sill is the the upper limit of the model. That is, the long-range largest value, ignoring any outliers.

Instructions

**100 XP**

A variogram has been plotted for you, and `ph_vgm`

has been pre-defined.

- Estimate some parameters by eyeballing the plot.
- The
`nugget`

is the value of the semivariance at zero distance. - The partial sill,
`psill`

is the difference between the sill and the nugget. - Set the
`range`

to the distance where the model first begins to flattens out.

- The
- Fit a variogram model by calling
`fit.variogram()`

.- The second argument should take the parameters you estimated, wrapped in a call to
`vgm()`

.

- The second argument should take the parameters you estimated, wrapped in a call to
- Plot the binned variogram.