Dear list,
I'm going through psgp and intamap package, but I've still some trouble.
Let suppose that in meuse dataset there is avariable, called for instance
"Zn_err" containing the range of measurement error associated to each
sampled value of Zn.
Using psgp package, I have to use it as parameters in the original dataset
(meuse) or as a parameter in intamap object?
This is because, following the example, I didn't found where I'm supposing
to declare the error variable.

Thanks a lot,

Enrico



2009/10/6 Cornford, Dan <D.Cornford@aston.ac.uk>

> Enrico,
>
>  sorry we have caused some problems / confusion. I will reply inline below:
>
> From: Enrico Guastaldi [mailto:enrico.guastaldi@gmail.com]
> Sent: 05 October 2009 17:04
> To: Cornford, Dan
> Cc: ai-geostats@jrc.it; r-sig-geo@stat.math.ethz.ch
> Subject: Re: AI-GEOSTATS: Interpolation of measures with measurement errors
>
> Dear Dan and dear lists members,
> I'm trying to explain my problem in two steps: the first is the theory, the
> second one the practical application on my case study.
>
> 1)
> Actually my errors are not so gaussian, however I think I could consider
> them gaussian like.
> It seems I've to set not zero the values of diagonal covariance matrix
> (used for the variogram). Maybe I've to put in these matrix the measurements
> errors instead zero. However, these are not actual variances, but ranges
> deriving from the instrumental error. Is it possible to assume it as
> confidence interval and use it such as the diagonal of covariance matrix?
> This in theory.
>
> DC: I think this highlights that when people specify errors they should be
> as precise as possible (this is what UncertML is designed to try and help
> people do). Giving a range is really only useful with a precise definition
> of what the min and max values mean (5th and 95th percentiles?). In a
> Bayesian approach to the problem, which I prefer, one is required to specify
> a probability distribution (two percentiles alone are not enough). This can
> be quite a challenge, but the other imprecise probability models while often
> being rather attractive on the surface can lack the ability to undertake
> complex analysis and generally can only make weaker statements (note I don't
> want to start a debate here about Bayesian versus other subjective /
> imprecise uncertainty frameworks!).
>
> DC: Also in theory yes, I might want to put observation errors on the
> diagonal of the covariance matrix, but I might also want to allow an
> additional nugget effect to model unresolved variation (i.e. things
> happening below the measurement separation distance) - I would want to
> estimate the nugget effect, but fix the known observation errors - we do
> this in the psgp code.
>
> DC: On the issue of Gaussian errors, well I think you are going to need to
> make some distributional assumption here and the Gaussian one will make life
> easier. My experience is that if your underlying distribution is symmetric
> then your mean predictions will not be overly sensitive to the exact
> distributional form (i.e. small deviations from Gaussian), but if the
> distribution is skewed significantly then this might be more of an issue.
> This is in practice I must say. I would also emphasise here we are
> discussing the errors on the observations, not the observations themselves!
>
> But in practice???
>
> 2)
> In practice, since I'm not a programmer, I've tried to use the psgp R
> package in order to perform the interpolation of my variable with the
> associated errors.
> I've tried to use the Intamap on line service, but I've got some problem
> with the net traffic (maybe) and I did not achieve the result.
> So, I installed psgp and intamap in my computer, in order to perform the
> calculation locally in my machine.
>
> First ten rows of my dataset are as follows (names of variables:X, Y,
> V2_PPM, ERR_V2_PPM:)
>
> 715946.900,4826440.340,2.280,0.140
> 722818.590,4824910.500,2.820,0.140
> 725514.920,4815239.460,2.380,0.130
> 722793.930,4810022.240,3.160,0.150
> 717682.540,4811456.540,3.040,0.140
> 712376.620,4806677.870,2.730,0.150
> 716270.140,4801958.660,2.650,0.140
> 721068.720,4801447.860,2.990,0.150
> 718812.980,4792920.780,4.450,0.170
> 722315.960,4788258.960,2.190,0.130
> ...
>
> Actually I'm not uderstanding how process these data to interpolate my
> variable V2_PPM.
> The EPSG code il 23032.
> Then, I think I've to set up my object as Intamap object  as follows (is it
> correct?):
>
> library(psgp)
> coordinates(rock) = ~X+Y
> data(grid.enrico)
> gridded(grid.enrico) = ~x+y
> proj4string(rock) = CRS("+init=epsg:23032")
> proj4string(grid.enrico) = CRS("+init=epsg:23032")
> # set up intamap object:
> obj = createIntamapObject(
>         observations = meuse,
>         predictionLocations = grid.enrico,
>         targetCRS = "+init=epsg:23032",
>         class = "psgp"
>
>
> However, I did not understand where I can declare the variable containing
> the measurement errors.
>
> DC: I am not a great R user I am afraid (I probably should not be sending
> this to the R sig list!) but Jon / Remi might be able to provide more advice
> on how to use psgp's from R in practice. I know the WPS rather better!
>
> DC: How big is your data set? If you send it to me, I'd be very interested
> to try with the web service since this is part of our project outcomes!!
>
> Moreover, I do not understand how prosecute the process (i.e. experimental
> variogram, variogram modelling, and finally kriging)
>
> DC: I can say more about how the psgp method works. This is a maximum
> (marginal) likelihood inference based method, so there is no experimental
> variogram modelling, rather a fixed covariance function (in the present
> implementation a sum of a Matern (5/2 order, fixed), exponential, and nugget
> covariance is used). This setup is chosen due to the automatic requirement -
> the covariance chosen is quite flexible and can represent many processes,
> but traditional geostatisticians might not like this, rather preferring to
> choose the variogram / covariance model in a variety of ways. If you use the
> C++ code you can set this, but at present we don't allow this in R. There is
> a quite good reason for this, since the psgp code allows the use of indirect
> observations and non-Gaussian noise, and in these settings computing
> experimental variograms is impossible and we think likelihood based
> inference is sensible (psgp is a lot like the model based geostatistics
> method).
>
> DC: In the psgp method parameter inference (variogram modelling, by maximum
> likelihood) and prediction (kriging) are also intertwined, although the R
> INTAMAP package calls things in an order that looks a lot more like kriging.
> If you are interested I can send a preprint of a paper we have just
> submitted, but I can see also that we probably need to do more work on the R
> interface!
>
> I hope this is useful,
>
> cheers
>
> Dan
>
> --
>
> Could you give me some hint?
>
> Thanks a lot in advance.
>
>
> Enrico
>
>
>
>
>

	[[alternative HTML version deleted]]

