linesCMB: Adds lines of fitted variograms to variogram plots

Description Usage Arguments Details Value References Examples

Description

This function adds a line with the variogram model fitted by the function variofitCMB to a current variogram plot. The function modifies lines.variomodel.variofit from the package geoR for additional covariance models on spheres.

Usage

1
linesCMB(x, max.dist, scaled = FALSE, ...)

Arguments

x

An object of the class variofit containing information about the fitted model obtained as an output of the function variofitCMB.

max.dist

A maximum distance to draw the variogram line. The default is x$max.dist.

scaled

logical. If TRUE the sill in the plot is 1.

...

other plotting parameters passed to curve

Details

The function adds a line with fitted variogram model to a plot. It is used to compare empirical variograms against fitted models returned by variofitCMB.

Available models are: "matern", "exponential", "spherical", "powered.exponential", "cauchy", "gencauchy", "pure.nugget", "askey", "c2wendland", "c4wendland", "sinepower", "multiquadric".

Value

A line with a fitted variogram model is added to a plot.

References

geoR package, lines.variomodel.variofit, covmodelCMB, variofitCMB

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Plot the fitted Matern variogram versus its empirical variogram
#
# df <- CMBDataFrame("../CMB_map_smica1024.fits")
# cmbdf <- sampleCMB(df, sample.size = 10000)
# varcmb <- variogramCMB(cmbdf, max.dist = 0.1, num.bins = 30)
# varcmb
# ols <- variofitCMB(varcmb,  fix.nug=FALSE, wei="equal", cov.model= "matern")
# plot(varcmb)
# lines(ols, lty=2)
#
## Plot the fitted Askey variogram versus its empirical variogram
#
# ols <- variofitCMB(vario1, ini.cov.pars = c(1, 0.03), fix.nug = TRUE,
#     kappa = 3, wei = "equal", cov.model = "askey")
# plot(varcmb, main = ols$cov.model)
# linesCMB(ols, lty = 2)

rcosmo documentation built on Dec. 11, 2021, 9:29 a.m.