[R-sig-Geo] 5-D Kernel density estimation in R using “kde” function

Ferra Xu ferra.xu at yahoo.com
Thu Sep 11 22:03:40 CEST 2014


Sorry, if the data is not clear here please take a look at this link: 5-D Kernel density estimation in R using “kde” function
  
             
5-D Kernel density estimation in R using “kde” function
I want to perform Kernel density estimate for a 5-dimensional data (x,y,z,time,size) by using "kde" function in "ks" library of R. In it's manual it says it can d...  
View on stackoverflow.com Preview by Yahoo  
  
 


On Thursday, September 11, 2014 1:00 PM, Ferra Xu <ferra.xu at yahoo.com> wrote:
 


 I want to perform Kernel density estimate for a 5-dimensional data (x,y,z,time,size) by using "kde" function in "ks" library of R. In it's manual it says it can do Kernel density estimate for 1- to 
6-dimensional data (Page 24 of manual: http://cran.r-project.org/web/packages/ks/ks.pdf).
My problem is that it says for more than 3 dimensions I need to 
specify eval.points. I don't know how can I specify the evaluation 
points because there is no example for more than 3 dimensions. For 
example if I want to generate equal boxes in the 3-D rectangular space 
of the problem and specify the center of each box as the eval-point, 
what should I do?
Here is my data:
422.697323164.198862.4574198.0837966360.83367586423.008236163.324340.555132637.584774550.893893903204.733908218.363651.939787437.883243120.912809449203.963056218.48080.372379143.217759030.926406005100.72758146.608761.402234149.415105190.782807523453.335182244.255211.629251751.737791750.903910803134.909462210.963332.238911953.134335210.896529401135.300562212.020550.673954167.550737450.748783521258.237117134.297352.120529176.340325870.735699304341.305271149.269533.71895894.339754830.849509216307.13892559.605710.6311074106.96367150.987923188307.7687558.914532.6496741113.85153070.802115718415.025535217.173981.7155688115.74646030.875580325414.977687216.733271.7107369115.97769480.767143582311.006135173.243782.7819572120.80795660.925380118310.116929174.281224.3318722129.26484010.776528535347.26091137.349463.5155427136.78512910.851787115351.31762433.657030.5806926138.73492840.9097230174.47189259.420681.4062959139.05437830.9672709765.48022359.728572.7326106139.2
1142770.987787428199.51302321.533022.5163259143.58956250.864164659198.71803123.501630.4801849147.22804660.74158733326.65051735.20190.8246514150.48765060.74478820225.08937990.478250.8700944152.19440460.77725247626.30743988.415522.4422487155.90900260.952215177234.282901236.114221.8115261155.96581440.776284654235.052948236.774371.9644963156.69002970.94428544823.04820298.62613.4573048159.77009120.77305749121.51669598.054312.5029284160.82029970.978779087213.936324151.870133.1042192161.06124890.80499513277.887935197.257531.3659279163.6731420.758978575277.239746197.540012.2109361166.26298680.775325157
And this is the code that I am using:
library(ks)library(rgl)kern <-read.table(file.choose(),sep=",")hat <-kde(kern)
It works for up to 3 dimensions but for 4 and 5 dimensions it says:  need to specify eval.points for more than 3 dimensions. 
	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list