Skip to content
Prev 165 / 15379 Next

[R-es] ayuda con dos topicos

Mire abajo.

2009/7/17 Marcia Muñoz <marcarmu en gmail.com>:
¿Puedes dar más detalles de lo que has hecho? específicamente, yo no encuentro
corSpher o corRatio en la ayuda de geoR.  En geoR hay varios métodos
para hacer variografía, mire
library(geoR)
?variog
?variog4
?variofIt
?eyefit

los últimos ajusta variograms teóricos a un variograma empírico, en
comparación,
?likfit
ajusta parametros en el variograma como parte de una estimación de un
modelo (gaussiano)
para el superficie, junto con trend parametros o otros. Esto puede
usar mucho más tiempo,
pero es teóricamente preferible. Haz ambos, y comparar resultados!

Unos ejemplos:
library(geoR)
library(help=geoR)
data(parana)
?parana

 plot(parana,  bor=borders)
variog: computing omnidirectional variogram
variog: computing omnidirectional variogram
variog: computing omnidirectional variogram
variofit: weights used: npairs
variofit: minimisation function used: optim
variofit: searching for best initial value ... selected values:
              sigmasq   phi      tausq kappa
initial.value "6258.48" "285.92" "0"   "0.5"
status        "est"     "est"    "est" "fix"
loss value: 7287615843.70907
Warning message:
In variofit(vario.b, cov.model = "matern", k = 0.5) :
  initial values not provided - running the default search
variofit: weights used: npairs
variofit: minimisation function used: optim
variofit: searching for best initial value ... selected values:
              sigmasq   phi     tausq    kappa
initial.value "4693.86" "95.31" "625.85" "1.5"
status        "est"     "est"   "est"    "fix"
loss value: 7660811461.0475
Warning message:
In variofit(vario.b, cov.model = "matern", k = 1.5) :
  initial values not provided - running the default search
variofit: weights used: npairs
variofit: minimisation function used: optim
variofit: searching for best initial value ... selected values:
              sigmasq   phi      tausq kappa
initial.value "6258.48" "285.92" "0"   "0.5"
status        "est"     "est"    "est" "fix"
loss value: 4933397738.6335
Warning message:
In variofit(vario.b, cov.model = "gaussian") :
  initial values not provided - running the default search
---------------------------------------------------------------
likfit: likelihood maximisation using the function optim.
likfit: Use control() to pass additional
         arguments for the maximisation function.
        For further details see documentation for optim.
likfit: It is highly advisable to run this function several
        times with different initial values for the parameters.
likfit: WARNING: This step can be time demanding!
---------------------------------------------------------------
likfit: end of numerical maximisation.
likfit: estimated model parameters:
    beta    tausq  sigmasq      phi
" 247.3" " 348.2" "3643.2" " 560.0"
Practical Range with cor=0.05 for asymptotic range: 1677.720

likfit: maximised log-likelihood = -672.2
Kjetil