similar to: non-linear binning? power-law in R

Displaying 20 results from an estimated 20000 matches similar to: "non-linear binning? power-law in R"

2003 Apr 08
3
density ranges for uniform law
Hello, I would have some details and explanations about the results I get. In fact, I start with a uniform sample between -1 and 1, and then plot its density. My problem is that the density ranges are much more longer than I expected : samp <- runif(10000,-1,1) plot(density(samp)) Instead of varying between -1 and 1, the density varies between approximaly -1.5 and 1.5 Could someone explain
2008 Mar 25
1
bandwidth estimation using bw.SJ
Hello All, When I use bw.SJ (based on Sheather & Jones, 1991) in R to estimate the bandwidth for a highly skewed data, I get the following message: "sample is too sparse to find TD". I played around with the parameters such as no. of bins (nb), lower, upper (range over which to minimize) to no avail. My sample size is 50,000. Can anyone tell me what this means and of some
2012 Jul 26
2
density
Hi all, I have a question regarding the density function which gives the kernel density estimator. I want to decide the bandwidth when using gaussian kernel, given a set of observations. I am not familiar with different methods for bandwidth determination. Below are the different ways in R on deciding the bandwidth. Can anyone give an idea on which ones are preferred. Also, how can I take
2017 Aug 15
1
Lattice Histogram Scaling
My apologies, the data can now be found at: url <- "http://www.econ.uiuc.edu/~roger/research/ebayes/velo.d" x <- scan(url,skip = 1) If I could get each of the histograms to mimic what is produced by hist(x, 100, freq = FALSE) I?ve experimented with xlim, ylim, without success so far... url: www.econ.uiuc.edu/~roger Roger Koenker email rkoenker at uiuc.edu
2017 Aug 14
1
Lattice Histogram Scaling
I am trying to do some comparisons of density estimators using lattice. The code below attempts to plot the same histogram in each panel and then overplots a kernel estimate with different bandwidths. Finding packet.number() was a bit arduous, but seems to do what I want. My concern now is that close examination of the 4 histograms reveals that they are different even though they use the same
2006 Mar 23
1
comparative density estimates
I have two series of events over time and I want to construct a graph of the relative frequency/density of these events that allows their distributions to be sensibly compared. The events are the milestones items in my project on milestones in the history of data visualization [1], and I want to compare trends in Europe vs. North America. I decided to use a graph of two overlaid density
2005 Sep 28
1
scatterplot3d + density() + polygon(color)
Hi R Users, How to use the function polygon() together with the package scatterplot3d? I am trying to color below of the curves defined for the function density(). I tried to use the site: R GRAPH GALLERY as tutorial. I tried to adapt the example of this page: [figure]: http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=30 [code]:
2010 May 13
1
cdplot() with 'POSIXct' x
Hi, Given that cdplot() is used to produce the conditional density of a categorical y along a numerical x, it seems natural that it could be used with a date or time x (such as 'POSIXct'). Is this desirable? If so, I've created a patch that would allow this, by coercing the POSIXct x variable to produce the density, but use the original POSIXct x to draw the x axis. Index:
2008 Jul 29
2
Help interpreting density().
I issue the following: > d <- density(rnorm(1000)) > d and get: Call: density.default(x = rnorm(1000)) Data: rnorm(1000) (1000 obs.); Bandwidth 'bw' = 0.2235 x y Min. :-3.5157 Min. :2.416e-05 1st Qu.:-1.6892 1st Qu.:1.129e-02 Median : 0.1373 Median :7.267e-02 Mean : 0.1373 Mean :1.367e-01 3rd Qu.: 1.9639
2011 Apr 03
3
kernel density plot
I am using the following commands for plotting kernel density for three kinds of crops density(s22$Net_income_Total.1, bw="nrd0",adjust=1, kernel=c("gaussian"))->t plot(t, xlim=c(-30000,40000), main="Net Income Distribution", axes=F, ylim=c(0,0.00035). xlab="Value in Rupees") par(new=T) density(s33$Net_income_Total.1, bw="nrd0",adjust=1,
2008 Feb 17
1
Probable bug in "An Introduction to R" (PR#10777)
Both the document and R itself are at 2.6.2 (2008-02-08). When I run in the Windows R console the command lines(density(eruptions, bw=0.1)) found in ? 8.2, I get: Error in plot.xy(xy.coords(x, y), type = type, ...) : plot.new has not been called yet Regards, Olivier Lefevre
2007 Aug 05
1
Selectively shading areas under two density curves
Dear Listers, I am drawing a plot of two density curves, for male and female incomes. I would like to shade/hatch/color (whatever) the areas under the curves which are distinctive for each gender. This is the code I have tried so far: m <- density(topmal.d$y, bw = "sj") f <- density(topfem.d$y, bw = "sj") par(mfrow = c(1,1)) plot(x = c(0,400), y = c(0,0.02), type =
2006 Jun 23
1
integrate
Dear All, My doubt about how to integrate a simple kernel density estimation goes on. I have seen the recent posts on integrate density estimation, which seem similar to my question. However, I haven't found a solution. I have made two simple kernel density estimation by: kde.1 <-density(x, bw=sd(x), kernel="gaussian")$y # x<- c(2,3,5,12) kde.2 <-density(y,
2007 Jun 19
2
Histogram
Hello, I am using the following codes to plot a histogram and density line for x. For the density line, I just want it to show the two tails, eg, for x larger than 0.05 ans smaller than -0.05 hist (x, seq(-0.1,0.1,0.01),freq = FALSE) lines (density(x,bw="SJ"), x> 0.05 & x< (-0.05), col = "red") But is does not work, can anyone give me some advice? -- View this
2008 Oct 30
1
A question about pairs()
Greetings R users, I am an R graphics newbie trying to produce a custom trellis plot using pairs() with R 2.7.2. I have spatial data on which I run a geographically weighted regression (gwr, using the -spgwr- package). I want to check the gwr coefficients for multicollinearity and spatial association, following Wheeler and Tiefelsdorf (2005), and I would like to summarize the results of this
2006 Jul 20
2
function names in a vector used by for (){} character problem ?
Hi there, i´m have vector of kernels. just like: kernels = c('gauss','epan','rectangular') i know there are density.default$kernels, but thats not my question here. my own kernel functions are running and working. my problem is the following is not working: dev.off() par(mfrow=c(3,3)) for(i in 1:length(bw)) { for(j in 1:length(kernels)) {
2010 Nov 02
5
density() function: differences with S-PLUS
Hello! Someone know what are the difference between R and S-PLUS in the density() function? For example, I would like to reply this simple S-PLUS code in R, but I don't understand which parameter I should modify to get the same results. S-PLUS CODE: density(1:1000, width = 4) R-CODE: density(1:1000, bw = 4, window = "g", n = 50, cut = 0.75) I obtain the same x values, but
2006 Jun 08
3
Re-binning histogram data
Hi, Short Version: Is there a function to re-bin a histogram to new, broader bins? Long version: I'm trying to create a histogram, however my input-data is itself in the form of a fine-grained histogram, i.e. numbers of counts in regular one-second bins. I want to produce a histogram of, say, 10-minute bins (though possibly irregular bins also). I suppose I could re-create a data set as
2009 Feb 16
1
How to add direction of time to plot.circular()
Dear r-helpers, I want to show that time is flowing CCW in the following: require(circular) len <- 8 labl <- as.character(c(0, 1, 1, 1, 0, 0, 1, 0)) r <- circular(2*pi* (rep(c(1, 3, 6), each = 200)/len + rnorm(600, 0, 0.025))) r.dens <- density(r, bw = 25, adjust = 4, kernel = 'vonmises') plot(r, shrink = 2.5, axes = FALSE, ticks = FALSE, pch = 1, col =
2011 Jul 12
1
High density scatter plot with logarithmic binning
How can perform logarithmic binning in the scatterplot? I could only take the log of the variables and plot them, but I am sure that is not the way. I have a very huge data, and would want to plot those high density scatterplots and code then with different colors for the bins/density. -- View this message in context: