variofitCMB | R Documentation |
This function estimates variogram parameters by fitting a parametric model
from covmodelCMB
to a sample variogram. The function extends
variofit
from the package geoR
to additional covariance models on spheres.
variofitCMB( vario, ini.cov.pars, cov.model, fix.nugget = FALSE, nugget = 0, fix.kappa = TRUE, kappa = 0.5, simul.number = NULL, max.dist = vario$max.dist, weights, minimisation.function, limits = geoR::pars.limits(), messages, ... )
vario |
An object of the class |
ini.cov.pars |
A vector with initial values for the variogram parameters. The first parameter corresponds to the variance sigma^2. The second parameter corresponds to the range phi of the correlation function. |
cov.model |
A type of the variogram function. Available choices are: "matern", "exponential","spherical", "powered.exponential", "cauchy", "gencauchy", "pure.nugget", "askey", "c2wendland", "c4wendland", "sinepower", "multiquadric". The default is "matern" |
fix.nugget |
logical. Indicates whether the nugget variance should be regarded as fixed or be estimated. The default is FALSE. |
nugget |
A value for the nugget parameter. Regarded as a fixed values if
|
fix.kappa |
logical. Indicates whether the parameter kappa should be regarded as fixed or be estimated. The default is TRUE. |
kappa |
A value for the smoothness parameter. Regarded as a fixed values if
|
simul.number |
number of simulation. Used if |
max.dist |
A maximum distance to fit a variogram model. The default is
|
weights |
Weights used in the loss function in the minimization algorithm. |
minimisation.function |
Minimization function ("optim", "nlm", "nls") to estimate the parameters. |
limits |
Lower and upper limits for the model parameters used
in the numerical minimisation by |
messages |
logical. Indicates whether or not status messages are printed on the screen. |
... |
other minimisation parameters |
The parameter values of a variogram function from covmodelCMB
are
found by numerical optimization using one of the functions: optim
,
nlm
and nls
.
The function extends variofit
from the package geoR
to additional variogram models on spheres. Available models are: "matern",
"exponential", "spherical", "powered.exponential", "cauchy", "gencauchy",
"pure.nugget", "askey", "c2wendland", "c4wendland", "sinepower", "multiquadric".
Additionally it rescales an empirical variogram to the range [0,1]
before
numerical optimisation and then transforms all obtained results to the original
scale. If ini.cov.pars
are not provided then the 5x5 grid
(seq(0,max(vario$v),l=5), seq(0,vario$max.dist,l=5))
of initial values of sigma^2 and phi is used.
An object of the class variomodel
and variofit
, see
variofit
geoR package, variofit
, covmodelCMB
# # 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) # str(ols) # # ols <- variofitCMB(varcmb, fix.nug = TRUE, kappa = 3, wei = "equal", # cov.model = "askey") # plot(varcmb, main = ols$cov.model) # linesCMB(ols, lty = 2) # str(ols)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.