Thanks Jesse!

I tried out your suggestion (after making sure that the projection is the
same), and I got this error message.

> kr <- krige(POVERTY_INCIDENCE~1, muni.sp, newdata=town, model=v.fin)[using ordinary kriging]Error in predict.gstat(g, newdata = newdata, block = block, nsim = nsim,  :
  gstat: value not allowed for: block kriging for long-lat data undefined


Do you know how to fix this?

James



On Sat, Aug 3, 2013 at 5:51 AM, Jesse Berman <berman.jesse@gmail.com> wrote:

> James,
>
> Have you considered block kriging with gstat?  This will allow a smoothed
> estimate of an area average (e.g. a county or town boundary) as opposed to
> over a fine grid.
>
> It's relatively simple, as you merely set the town boundary as your
> 'newdata,' although you will have to make sure it's in the same projection
> as your points.
>
> kr <- krige(POVERTY_INCIDENCE~1, muni.sp, newdata=town, model=v.fin)
> spplot(kr, "var1.pred", col.regions = rev(topo.colors(20)))
>
> Jesse
>
>
>
>
> -----
> --------------------------------------------------------
> Jesse D Berman, PhD
> Johns Hopkins Bloomberg School of Public Health
> Department of Environmental Health Sciences
> Post-Doc
> --
> View this message in context:
> http://r-sig-geo.2731867.n2.nabble.com/How-to-do-Zonal-Statistics-after-Kriging-in-R-given-Shapefile-of-Polygon-tp7584330p7584332.html
> Sent from the R-sig-geo mailing list archive at Nabble.com.
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>



-- 
*

*
*James Matthew B. Miraflor*
MS Computer Science
College of Engineering
University of the Philippines

http://politicsforbreakfast.blogspot.com
________

"No problem can withstand the assault of sustained thinking." - Voltaire
________

	[[alternative HTML version deleted]]

