[R-sig-Geo] Manually defining the regression model in universal kriging [SEC=UNCLASSIFIED]

Edzer Pebesma edzer.pebesma at uni-muenster.de
Fri Nov 14 08:14:58 CET 2008


Alison,

there's two ways for this:

1. provide krige() with regression coordinates, by

ObsSat.rk <- krige(Obs_rain~sat_rain, ObsSat_UTM, SatDat_UTM,
ObsSat.rvgm, beta = c(a,b))

with a and b your "manual" intercept and slope, or

2. by kriging manually computed residuals and adding them to the 
manually computed regression surface.

Probably, 1. is simplest; the results are identical if under 2. you 
specify beta = 0.0, thereby forcing simple kriging over ordinary 
kriging. Some might prefer 2. with ordinary kriging, e.g. to allow for a 
locally adapting mean, but you didn't use local kriging in the first place.
--
Edzer

Alison Oke wrote:
> Hello list,
>
> I am trying to use universal kriging (gstat, R) to create a gridded
> daily rainfall surface. I have rain gauge data and satellite grid data
> and have applied the following script successfully. I would now like to
> manually define the regression model that defines the relationship
> between the gauge and satellite at the collocated points so I can apply
> the same model to a series of days. Is it possible to manually define
> the regression equation and have it applied within the krige function? 
>
>  
>
> Datasets
>
> ObsSat_UTM = collocated gauge and satellite data.
>
> SatDat_UTM = Satellite grid. 
>
>  
>
> # Define the regression model to define relationships between dependent
> (gauge) and independent (sat) variables at collocated points. 
>
> ObsSat.lm <-lm(formula = Obs_rain~sat_rain, ObsSat_UTM)
>
>  
>
> #Variogram of residuals of regression between obs and sat data a gauge
> sites
>
> ObsSat.rev <- variogram(Obs_rain~sat_rain, ObsSat_UTM)
>
> ObsSat.rvgm <- fit.variogram(ObsSat.rev, vgm(20,"Exp", 50,0))
>
>  
>
> #predict onto the Sat grid
>
> ObsSat.rk <- krige(Obs_rain~sat_rain, ObsSat_UTM, SatDat_UTM,
> ObsSat.rvgm)
>
>  
>
> If this question has already been answered I apologise. I have had
> trouble finding any examples of how to include this into my script.
>
> Thanks very much 
>
> Alison Oke
>
>  
>
> Hydrologist
>
> Water Division
>
> Bureau of Meteorology
>
> GPO Box 1289
>
> Melbourne, VIC 3001
>
>  
>
> Phone:  +61 (0) 3 8638 8212
>
> Fax:      +61 (0) 3 8638 8200
>
> E-mail:   a.oke at bom.gov.au
>
>  
>
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>   

-- 
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster
Weseler Straße 253, 48151 Münster, Germany. Phone: +49 251
8333081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de/
http://www.springer.com/978-0-387-78170-9 e.pebesma at wwu.de




More information about the R-sig-Geo mailing list