Re: [R-sig-Geo] formula understanding

2011-02-24 Thread Anna Gretschel

Am 24.02.2011 23:19, schrieb Edzer Pebesma:


On 02/24/2011 09:40 PM, Anna Gretschel wrote:

Dear List,

The following formula is given for a spherical model in variofit (geoR).

/rho(h) = 1 - 1.5 * (h/phi) + 0.5(h/phi)^3 if h<  phi , 0 otherwise

/Could anyone explain what the term "if hphi?

rho(h)


And shouldn't there be a * between 0.5 and (h/phi)?

That would have been consistent, but as this is documentatation, I don't
think it is wrong.


Thanks in advance,
Anna

[[alternative HTML version deleted]]

___
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Thank you! If you don't mind I would like to ask you another question:
I want to use this function to calculate a rmse (root mean square error) 
for my fitted models.


obs beeing the observed data (in my case variog$v) and pred beeing the 
predicted data I use the following formula:


rmse <- function(obs, pred) sqrt(mean((obs-pred)^2))

pred I calculated like this:

pre<- 1 - 1.5 * (h/phi) + 0.5(h/phi)^3 if h<  phi , 0 otherwise
with phi beeing the range and h beeing the distances (variog$u)



The output however is not reliable so I think I made a mistake but 
cannot figure out what is wrong. Do you have an idea what I where the 
error is in reasoning?


Thank you so much for allways replying to my beginners questions :)
Anna

___
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo


Re: [R-sig-Geo] formula understanding

2011-02-24 Thread Edzer Pebesma


On 02/24/2011 09:40 PM, Anna Gretschel wrote:
> Dear List,
> 
> The following formula is given for a spherical model in variofit (geoR).
> 
> /rho(h) = 1 - 1.5 * (h/phi) + 0.5(h/phi)^3 if h < phi , 0 otherwise
> 
> /Could anyone explain what the term "if h part of the equation becomes 0 if h>phi?

rho(h)

> And shouldn't there be a * between 0.5 and (h/phi)?

That would have been consistent, but as this is documentatation, I don't
think it is wrong.

> Thanks in advance,
> Anna
> 
>   [[alternative HTML version deleted]]
> 
> ___
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> 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.52north.org/geostatistics  e.pebe...@wwu.de

___
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo