Displaying 20 results from an estimated 1000 matches similar to: "density estimates for fixed points"
2006 Jan 19
2
function kde2d
Good evening,
I am Marta Colombo, student at Milan's Politecnico.
Thank you very much for your kindness, this mailing list is really useful.
I am using the function kde2d for two-dimensional kernel density estimation and I'd like to know something more about this kind of density estimator. In particular I'd like to know: what bandwidth is used ?
Thank you in advance for your attention
2006 Jun 14
1
Estimate region of highest probabilty density
Estimate region of highest probabilty density
Dear R-community
I have data consisting of x and y. To each pair (x,y) a z value (weight) is assigned. With kde2d I can estimate the densities on a regular grid and based on this make a contour plot (not considering the z-values). According to an earlier post in the list I adjusted the kde2d to kde2d.weighted (see code below) to estimate the
2007 Mar 28
2
Standardization Range
? stato filtrato un testo allegato il cui set di caratteri non era
indicato...
Nome: non disponibile
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20070328/ee4422a2/attachment.pl
2012 May 22
4
“For” calculation is so slow
Dear All,
The function I wrote can run well with the small data, but with the large
data, the function runs very very slowly. How can I correct it? Thank you
very much. My function as below:
a<-c(1:240)
b<-c(1:240)
l=function(a,b){
v=0
u=0
uv=0
v[1]=0
u[1]=0
uv[1]=0
for (i in 1:(length(s)-1)){
v[i]<-((gx[[i]][b,(gx[[i]][a,1]+1)])-(gx[[i]][a,gx[[i]][a,1]+1]))/(gx[[i]][a,gx[[i]][a,1]+1])
2007 Aug 10
1
kde2d error message
Hello!
I am trying to do a smooth with the kde2d function, and I'm getting an error
message about NAs. Does anyone have any suggestions? Does this function
not do well with NAs in general?
fit <- kde2d(X, Y, n=100,lims=c(range(X),range(Y)))
Error in if (from == to || length.out < 2) by <- 1 :
missing value where TRUE/FALSE needed
Thanks in advance!!
Jen
[[alternative
2011 Nov 25
1
Multiple selection, renaming and saving the results
Dear all,
I have a
big data frame:
str(data1)
'data.frame': 18272 obs. of 11 variables:
$ tag :
int 100001 100002 100003 100005 100007
100008 100009 100011 100012 100014 ...
$ sp :
Factor w/ 18 levels "acassp","acocar",..: 13 5 7 14 14 18 3
11 13 10 ...
$ gx :
num 20 10 35 68 88 63 123 115 137 136
...
$ gy :
num 30 25 24 1 10 40 45 25 23 45 ...
2008 Jun 25
1
confidence bounds using contour plot
Hello
I'm trying to calculate 2d confindence bounds into a scatterplot using the
function "kde2d" (package MASS) and a contour plot.
I found a similar post providing a solution - unfortunatly I do not realy
understand which data I have to use to calculated the named "quantile":
Post URL: http://tolstoy.newcastle.edu.au/R/help/03b/5384.html
> (...)
>
>> Is
2007 Sep 23
2
return(x=x,y=y,prob=prob) hasn't been used in R now?
Dear friends,
Now, when i use the argument return(x=x,y=y,prob=prob) , R displays the
waring message:
Warning message:
The return value for multiple variables wasn't used in: return(x = x, y =
gy, prob = prob)
I used the methods of "help.search("return")" and "?return" to get some
help, but didn't find info on it.
Anybody knows how it should be used
2012 Apr 18
1
ggplot2 stat_density2d issue.
Hello,
I'd be very grateful for help with some ggplot2's stat_density2d issues.
First issue is with data limits. xlim() and ylim() doesn't seem to
work; instead, estimates (and plotting) seems to be constrained to
range(x), range(y) no matter what i do. The documentation says i can
pass in kde2d's parameters to ... but pussing kde2d's "lims" parameter
achieves
2009 Jul 06
1
how to apply a self-written function to a data frame
Hello,
I have written a function in order to analyse gaze paths. It works with the test data but when I try to apply the function to a data frame that stores "the real data" in columns I receive the error message that the
" In if (pp > 1) { :
condition has length > 1 only the first element will be used
"
I interpret this error message as saying that only the first
2007 Nov 26
2
2d Joint Density Plot
Hi all,
I'm fairly new to R, so I'm still trying to feel out what is available to
me. I would like to be able to plot joint density in a two dimensional plot
where density is indicated by color or darkness gradients, like a 2d color
coded topographic map. Ideally, the output would be something I could then
plot other points or lines on.
Currently, I'm calculating joint density with
2010 Nov 20
2
How to do a probability density based filtering in 2D?
Hello,
This sounds like a problem to which many solutions should exist, but I
did not manage to find one.
Basically, given a list of datapoints, I'd like to keep those within
the X% percentile highest density.
That would be equivalent to retain only points within a given line of
a contour plot.
Thanks to anybody who could let me know which function I could use!
Best,
Emmanuel
2007 May 05
1
(no subject)
Dear Mailing-List,
I think this is a newbie question. However, i would like to integrate a
loop in the function below. So that the script calculates for each
variable within the dataframe df1 the connecting data in df2. Actually it
takes only the first row. I hope that's clear. My goal is to apply the
function for each data in df1. Many thanks in advance. An example is as
follows:
df1
2011 Feb 15
1
gList and gTree methods of grid::grobX
Dear all,
In an attempt to draw fill patterns in grid graphics, I have
encountered a behavior of grobX that I cannot understand from the
documentation. Consider this,
library(grid)
## gTree
g1 <- gTree(children=gList(
rectGrob(0.5,0.5, width=unit(0.8,"npc"),
height=unit(2,"cm")),
circleGrob(r=0.3)), vp=viewport(0.5,0.5))
##
2009 Jun 26
1
gradient fill of a grid.polygon
Dear list,
Following a recent enquiry, I've been playing with the idea of creating a
colour gradient for a polygon, using the Grid package. The idea is to draw a
number of stripes of different colours, using the grid.clip function. Below
is my current attempt at this,
library(grid)
rotate.polygon <- function(g, angle=0){ # utility function, works fine
matR <- matrix(c(cos(angle),
2008 Jan 16
1
Probability weights with density estimation
I am a physician examining an NHANES dataset available at the NCHS
website:
http://www.cdc.gov/nchs/about/major/nhanes/nhanes2005-2006/demo_d.xpt
http://www.cdc.gov/nchs/about/major/nhanes/nhanes2005-2006/hdl_d.xpt
http://www.cdc.gov/nchs/about/major/nhanes/nhanes2005-2006/tchol_d.xpt
Thank you to the R authors and the foreign package authors in
particular. Importing from the SAS export
2009 Mar 17
1
help with 3-D plot of kernel density estimates
Hi,
I guess I have a naive question. I use kde2d function in a standard way to
estimate kernel densities of x and y (x and y are vectors) and plot them
using image().
f1=kde2d(x,y)
image(f1)
But what if I want to see kernel estimates of three variables, x, y and z (a
vector) plotted together ? Something in which x<->y is plotted and colored
according to the corresponding value of z ?
2004 Dec 22
0
weighted kernel density estimation
Dear wizaRds,
I use the MASS::kde2d function to estimate density of the two first
principal components. I do that to have a graphic visualisation of a
"group structure" in my dataset. So far, no problem.
But i would like to estimate that density using weights according to the
COS?? values that tells me if my observation is well represented on the
factorial plan 1-2. I would like to
2006 Jul 24
9
RadRails with Eclipse
Hi all,
who is using RadRails with Eclipse to create RoR applications?
jsn
--
Posted via http://www.ruby-forum.com/.
2009 Jun 07
2
Need some help in R : value more than equals to a row.
Hallo,
I was trying some code, but couldn't make one step of the code properly.
Can anybody please help me?
I have one matrix like this
> values
[,1] [,2] [,3] [,4] [,5]
[1,] 0.7777778 0.36111111 0.22222222 0.1388889 0.0000000
[2,] 1.0000000 0.00000000 0.53846154 0.0000000 0.5384615
[3,] 0.5200000 0.48000000 0.64000000 0.0000000 0.8800000
[4,] 0.8928571