Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate unconditional simulations for power variogram model #121

Open
Martin20494 opened this issue Feb 21, 2023 · 1 comment
Open

Generate unconditional simulations for power variogram model #121

Martin20494 opened this issue Feb 21, 2023 · 1 comment

Comments

@Martin20494
Copy link

I have a question about how to generate unconditional simulations for power variogram model. I have tried as below:

# Calculate original variogram
var <- gstat::variogram(object=z~1, locations=<some_dataset>)
fit_var <- gstat::fit.variogram(object=var, model=gstat::vgm(range=1.8, model="Pow"))

# Generate simulations
z.pred <- gstat::gstat(formula = z ~ 1, locations = ~x + y, dummy = T, beta = 0,  model = gstat::vgm(range=1.8, model='Pow'), nmax = 10)
set.seed(1)
z.usim <- gstat::predict(z.pred, newdata = <new_some_dataset>, nsim = 50)

And I got this error

Error in predict.gstat(z.pred, newdata = newbathy_sdf, nsim = 50) : 
value not allowed for: covariance from non-transitive variogram not allowed

As I understand from the error and from here, covariance modelling and simple kriging cannot produce simulations of power variogram because there is no sill. If this is the case, do you know any other way that I can generate unconditional simulations for power variogram model with gstat?

@edzer
Copy link
Member

edzer commented Feb 21, 2023

I don't. @BenGraeler ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants