Hello everyone,
I am looking for a R code to simulate an spatial distribution of multinomial classes (like colors classes) in a map. The problem is find a a multivariate distribution of the color classes (covariate: color maps) and a continous variable (like rain or PH) to study different kriging (cokriging) methodologies to make cross-validation predictions in order to test the effect on prediction which helps solve some of the data I now encounter. Does somebody know what to do in such a situation? Does somebody know what to do to treat multinomial classes covariate in spacetime models using kriging? I found this (DCluster package), but I am not sure if my way is wrong: ---------------------------------------------------------------------------------------------- library(DCluster) library(boot) library(spdep) data(nc.sids) sids<-data.frame(Observed=nc.sids$SID74) sids<-cbind(sids, Expected=nc.sids$BIR74*sum(nc.sids$SID74)/sum(nc.sids$BIR74)) sids<-cbind(sids, Population=nc.sids$BIR74, x=nc.sids$x, y=nc.sids$y) #K&N's method over the centroids mle<-calculate.mle(sids, model="poisson") knresults<-opgam(data=sids, thegrid=sids[,c("x","y")], alpha=.05, + iscluster=kn.iscluster, fractpop=.5, R=100, model="multinomial", mle=mle) #Plot all centroids and significant ones in red plot(sids$x, sids$y, main="Kulldorff and Nagarwalla's method") points(knresults$x, knresults$y, col="red", pch=19) dev.off() ----------------------------------------------------------------------------- Thank you very much in advance! Any tips are appreciated much! cheers, Toni MonleĆ³n UB _______________________________________________ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo _______________________________________________ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo