Need expert statistical support?

More Info

Module

asreml.plotting.variogram

Variogram module

Members

function

variogram

#
def variogram( data=None, x=None, y=None, z=None, composite: bool = True, metric: str = 'euclidean', angle: Union[list[float], float, NoneType] = 0.0, angle_tolerance: float = 180, n_lags: int = 20, max_distance: float = 0.5, lag: float = nan, lag_tolerance=0.5, grid: bool = True, graph: bool = True, title: Optional[str] = None, template: str = 'plotly_white', title_size: float = 1, plot_lowess: bool = True, palette: Union[str, list[str], NoneType] = None, colour_scale: str = 'plasma', file_name: Optional[str] = None):

Calculate variogram of three series (x,y,z) and return it as a pandas dataframe.

The data frame includes the following columns:

NPoints: The number of pairs in the lag. Vari: The variogram estimate. For a grid variogram only: DistX: The original x coordinates. DistY: The original y coordinates. otherwise: Distance: The average distance for pairs in the lag bin. Direction: direction in degrees.

Arguments:
  • composite: form a composite variogram (True or False); default = True a non-composite variogram separates the differences into left and right differences.
  • metric: the metric to use to calculate lag lengths (euclidean or manhattan); default euclidean.
  • max_distance: the maximum lag to calculate (given as a proportion of the range); default 0.5.
  • n_lags: number of steps in the lag bins between 0 and max_distance*range; default 20.
  • angle: list of angles in degrees to use as the centre of bins; default [0] i.e. combine all angles.
  • angle_tolerance the tolerance in degrees around the centre of the angle bin; default 180.
  • lag: number giving the step between lags. If this is provided, max_distance is ignored and max_distance will be taken as n_lags*lag.
  • lag_tolerance: the tolerance from the lag at the centre of the bin, used when allocating points to bins; default 0.5
  • grid: produce a variogram on the grid coordinates (True or False); default True. The points must lie on a rectangular grid if this is True.
  • graph: plot the variogram (True or False).
  • title: a string giving the overall title to the plot. The default is
  • an automatic title 'Variogram for vs '.
  • title_size: relative size of the titles; default 1.
  • template: the name of a plotly template to use for the style of the graphs. The templates available are 'ggplot2', 'seaborn', 'simple_white', 'plotly', 'plotly_white', 'plotly_dark', 'presentation', 'xgridoff', 'ygridoff', 'gridon' and 'none'. The default is 'plotly_white'.
  • palette: The name of a colour palette used to plot the directions in. The available options are 'Alphabet','Dark','Light','Pastel','Safe' and 'Vivid'. The default is 'Vivid'.
  • colour_scale: The name of a plotly colour scale used to plot the variogram surface with. The default is 'plasma'.
  • plot_lowess: indicating whether to include a lowess smoothing curve on the trends in variances for each angle (True or False).

Want to sharpen your statistics skills?

Browse Courses