similar to: How to translate the 2D-density matrix (the output of bkde2D function) into matrix of datapoints' amounts?

Displaying 20 results from an estimated 500 matches similar to: "How to translate the 2D-density matrix (the output of bkde2D function) into matrix of datapoints' amounts?"

2011 Dec 22
1
overlaid filled contour plots
I'm trying to make a set of contour plots of bivariate kernel density estimates, showing three such plots overlaid, similar to this plot http://euclid.psych.yorku.ca/SCS/Private/Test/ridge-boot2.pdf except that I would like to have the contours *filled* (using transparent colors). To make this reproducible, I've saved the results of KernSmooth::bkde2D() in the following file:
2006 Mar 31
1
mutual information for two time series
Hi I hope this is going to the right place. I am trying to write a program which uses KernSmooth library to estimate mutual information between two time series at various different lags. At the moment it’s producing negative values, which is supposed to be impossible (something is fishy). I am summing across one row of the matrix to get p(value is in bin x) and summing across the columns to get
2007 Sep 07
1
contourplot lines, text, and mtext
If I have a contourplot (in the lattice package) and I want to add straight lines to it, how do I do this? I see that there are llines() and lsegement() functions for lattice plots, but they don't seem to do anything in this case: library(lattice) library(KernSmooth) x=rnorm(10000) y=x+rnorm(x,0,.5) a=bkde2D(cbind(x,y),.7) z=as.vector(a$fhat) grid=expand.grid(x=a$x1,y=a$x2) grid$z=z
2002 Mar 31
1
How to get the datapoints of an density estimationwithlocfit?
Hello!! At first thank you all for your suggestions and your help. But I would like to get another group of datas from the density estimation. I don't know if these information are provided by locfit or I should use an other function like plot(). Description: Each number between 1 and 100 (only integer) for example should have only one density value. But I also would like to have the density
2013 Sep 22
2
colores
Como usas la función image puedes consultar la ayuda ?image o help(image) y encontrarás el siguiente ejemplo donde se usa un diferente color Palette (mencionada por pepeceb en su respuesta). x <- 10*(1:nrow(volcano)) y <- 10*(1:ncol(volcano)) image(x, y, volcano, col = terrain.colors(100), axes = FALSE) # O puedes usar directamente el número para indicar el color image(x, y, volcano, col =
2010 May 04
3
Kernel density estimate plot for 3-dimensional data
Hi! I have a problem with Kernel density estimate plot for 3-dimensional data in ks-package. Here the example: # load ks, spatstat # three-dimensional kernel density of B B <- pp3(runif(300), runif(300), runif(300), box3(c(0,1))) x <- unclass(B$data)$df H <- Hpi(x) fhat <- kde(x, H=H) plot(fhat) plot(fhat, axes=FALSE, box=FALSE, drawpoints=TRUE);
2002 Mar 29
2
How to get the datapoints of an density estimation with locfit?
Hello!!! I'm just a beginner of R. I work with locfit to get the density from an numeric vector. It looks good when I plot the graph, but I need the output data of locfit. For example I need somthing like that (only integer values for the input): numeric vector (input of locfit) density (output of locfit) 1 0.05.... 2 0.04.. 3 0.01 ... Thank you for your help and your time.
2013 Sep 22
0
colores
Por favor ver comentario con las las letras mayúsculas data("CPS1985", package = "AER") cps <- CPS1985 cps [1:10,] dim( cps) names( cps) library("quantreg") #regresion usual cps_lm <- lm(log(wage) ~ experience + I(experience^2) + + education, data = cps) #regresion por quantiles, tau son los cuantiles
2004 Nov 03
1
Kernel Density estimation - locfit package
Hello there, I am presently using the locfit package in "R" and would appreciate some help here. Could anyone tell me tell me how I can obtain the various components (x and y values)of the density estimation after using the "R" command "locfit"? For example, with the command "fhat<-density(somename)" I can obtain the x and y values by simply calling
2013 Sep 22
2
colores
¿ como se pueden cambiar estos colores, gray.colors a otros library("KernSmooth") cps_bkde <- bkde2D(cbind(cps$experience, log(cps$wage)), bandwidth = c(3.5, 0.5), gridsize = c(200, 200)) image(cps_bkde$x1, cps_bkde$x2, cps_bkde$fhat, col = rev(gray.colors(10, gamma = 1)), #### pregunta?como se pueden cambiar estos colores xlab =
2000 Mar 22
4
density ellipses?
Hello, has anybody written a function to plot density ellipses (95%, 99% or anything) in a scatterplot? I found nothing in any package, nor in the list archives. There does seem to be a contributed package "ellipse" for S-Plus (on S-Archive), but it does a lot more than what I would need. Still, if anybody ported it to R, I'd be grateful for a link. I'm a bit afraid to try the
2003 May 12
1
Name spaces in R 1.7.0
Dear all, a colleague of mine has some code that calls "linbin2D" in package "KernSmooth" directly. That code is broken under R 1.7.0 since "KernSmooth" does not export "linbin2D" from its namespace. Via trial and error we found to possible solutions: 1) Edit the file NAMESPACE in the directory where KernSmooth is installed such that linbin2D is
2011 Sep 30
1
Implementing Silverman's Negative Reflection
Hi! I'm trying to implement in R in an easy way the negative reflection method described in Silverman (1986) on p.31, ie I have a non-negative dataset and would like to estimate the density by applying a reflection method where the reflected points have weight -1. I thought there should be a way to evaluate the wanted kernel at the required points, in other words to calculate formula (2.16):
2002 Dec 09
1
3D density estimation
I am trying to carry out density estimation for three dimensions (with anywhere between a few hundred and ~8000 data points). Which leads me to ask: a) is there any equivalent to kde2d (in MASS) or bkde2D (in KernSmooth) out there for three dimensions? b) if not, my skills only seem to extend as far as writing a function which measures density as the number of data points falling within a
2009 Nov 26
2
Export kde object as shapefile
I am trying to estimate home range size using the plug-in method with kernel density estimation in the kernel smoothing (ks) package. Unless there is another way I am not familiar with, in order to calculate spatial area under the space I need to convert my kde () object into a spatial object somehow in order to calculate its spatial area. Could someone demonstrate how this might be done? --
2005 Apr 28
1
strange behaviour of importFrom directive in name space
Dear listers, After activating the name space for my bioconductor package (prada) I successfully ran R CMD check. However when loading the package in R and running the examples the imported function brewer.pal from package RColorBrewer is not found. I can directly call brewer.pal from the RColorBrewer name space typing RColorBrewer::brewer.pal, but it is not imported into my prada name space. When
2005 Apr 28
1
strange behaviour of importFrom directive in name space
Dear listers, After activating the name space for my bioconductor package (prada) I successfully ran R CMD check. However when loading the package in R and running the examples the imported function brewer.pal from package RColorBrewer is not found. I can directly call brewer.pal from the RColorBrewer name space typing RColorBrewer::brewer.pal, but it is not imported into my prada name space. When
2003 Oct 22
1
2 D non-parametric density estimation
I have spatial data in 2 dimensions - say (x,y). The correlation between x and y is fairly substantial. My goal is to use a non-parametric approach to estimate the multivariate density describing the spatial locations. Ultimately, I would like to use this estimated density to determine the area associated with a 95% probability contour for the data. Given the strong correlation between x and
2006 Jul 04
1
problem getting R 2.3.1 svn r38481 to pass make check-all
Hi, I noticed this problem on my home desktop running FC4 and again on my laptop running FC5. Both have previously compiled and passed make check-all on 2.3.1 svn revisions from 10 days ago or so. On both these machines, make check-all is consistently failing (4 out of 4 attempts on the FC 4 desktop and 3 out of 3 on the FC 5 laptop) in the p-r-random-tests tests. This is with both default
2009 Dec 14
0
Confused on using expand.grid(), array(), image() and npudens(np) in my case
Hi all, I want to use the npudens() function in the np package (multivariate kernel density estimation), but was confused by the several functions in the following codes,expand.grid(),array(),image() and npudensbw(). This confusion will only be generated in >=3 dimensions. I marked the four places with confusion1-4. I think there should be some kind of correspondence in those four