1

I am using the automap package to calculate spatial interpolation because I do not want to specify the nugget, sill, or range in the krige function in gstat package.

The value I want to do spatial interpolation is PM 2.5. Its value can not be smaller than zero. But I get a few negative value. How to avoid this?

Paul Hiemstra
  • 59,984
  • 12
  • 142
  • 149
Ben
  • 665
  • 1
  • 10
  • 27

1 Answers1

1

You can't. Kriging weights are not constrained to positive values, such as for instance inverse distance weights. Somewhat exotic kriging varieties have been developed to address this issue; you could for instance check CRAN package compositions, for composition data.

Edzer Pebesma
  • 3,814
  • 16
  • 26