If you don't insist on kernel smoothing, and are willing to use something
similar, locfit() in the locfit package uses local likelihood to estimate
density and can accept weights.  E.g.,

library(locfit)
plot(locfit(~Petal.Length + Petal.Width, data=iris))
plot(locfit(~Petal.Length + Petal.Width, data=iris, weights=rep(1:3,
each=50)))

Andy

From: May, Roel
> 
> Dear R-users,
> 
> I intend to do a spatial analysis on the genetic structuring 
> within a population. For this I had thought to prepare a 
> kernel density estimate map showing the spatial distribution 
> of individuals, while incorporating the genetic distances 
> among individuals. I have a dataset of locations of N unique 
> individuals (XY-coordinates) and an NxN matrix with the 
> genetic distances given as a fraction between 0 and 1. As far 
> as I understand the methodology, a kernel density estimate 
> works with the geographic distance matrix. My idea was to 
> somehow incorporate the genetic distance matrix (e.g. as an 
> among-individual-based smoothing
> factor???) in the estimation. Does anyone know if this is 
> possible? To me it sounds a logical inclusion which may be 
> interesting for a wide variety of topics (i.e., "not all 
> individuals are equal"). I hope someone knows of any way to 
> proceed. Thanks in advance,
>  
> 
> Cheers Roel May
> 
>  
> Roel May
> Norwegian Institute for Nature Research (NINA)
> Tungasletta 2, NO-7485 Trondheim, Norway
> Tlf. +47 73 80 14 65, Mob. +47 95 78 59 95
> Email [EMAIL PROTECTED]
> Internett www.nina.no, www.jerv.info
> 
> ______________________________________________
> [email protected] mailing list 
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
> 
>

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to