Displaying 20 results from an estimated 9000 matches similar to: "weird breaks in hist (PR#2431)"
2008 May 19
2
How hist() decides breaks?
Hi Folks,
I'd like to know how hist() decides how many cells to use
when it ignores my "suggestion" to use say 'hist(...,breaks=50)'.
More specifically, I have the results of 10000 simulations,
each returning an 8-vector, therefore 8 variables each with
10000 values. Some of these 8 have somewhat skew distributions.
Say one of these 8 variables is X.
I ask for H <-
2010 Jan 17
4
datasets para regresión logística binomial y multinomial
Buenas.
Sé que en R hay multitud de datasets y me haría falta alguno que
trataran de variables relacionadas con salud, sobre todo para aprender
más acerca de cómo realizar una regresión logística binomial o multinomial.
Gracias..
2009 Jun 30
1
(no subject)
Hi Group,
I've a vector of 1000 numeric values for which I want to draw a histogram. I've read this vector into R with no variable name.I mean only the 1000 values, which makes V1 the name of the variable by default?? Then I tried
> hist(V1, breaks = "Sturges",
+ freq = NULL, probability = !freq,
+ include.lowest = TRUE, right = TRUE,
+ density = NULL, angle =
2011 Mar 03
3
Probabilities greather than 1 in HIST
Dear all,
I am a newbie in R and could not find help on this problem. I am trying to
plot an histogram with probabilities in the y axis. This is the code I am
using:
#TLC uniform
n=30
mi=1; mx=6
nrep=1000
xbar=rep(0,nrep)
for (i in 1:nrep) {xbar[i]=mean(runif(n,min=mi,max=mx))}
hist(xbar,prob=TRUE,breaks="Sturges",xlim=c(1,6),main=paste("n =",n),
xlab="Média",
2009 May 12
1
how the break is calculated by R?
Hi all:
As to hist,the help file says:" R's default with equi-spaced breaks (also the default) is to plot the counts in the cells defined by breaks."
I wanna know how the break is calculated by R?
In other words: break = (max - min)/(number of group) but how the "number of group" is calculated by R? Thanks!
2017 May 18
2
Bug: floating point bug in nclass.FD can cause hist() to crash
Hello everybody,
This is a bug involving functions in core R package:
graphics::hist.default, grDevices::nclass.FD, and
base::pretty.default. It is not yet on Bugzilla. I cannot submit it
myself, as I do not have an account. Could somebody else add it for
me, perhaps? That would be much appreciated.
Kind regards,
Sietse
Sietse Brouwer
Summary
-------
Floating point errors can cause a data
2007 Jun 14
3
problem with hist()
Hey everybody,
I try to make a graph with two different plots.
First I make a boxplot of my data. It is a collection off correlation
values of different pictures. For example:
0.23445 pica
0.34456 pica
0.45663 pica
0.98822 picb
0.12223 picc
0.34443 picc
etc.
Ok, I make this boxplot and I get for every picture the boxes. After this
I want to know, how many correlations per picture exist.
So I
2006 Nov 10
3
unwarranted warning from hist.default (PR#9356)
> x = rnorm(100)
> b = seq(min(x) - 1, max(x) + 1, length = 11)
> b
[1] -3.4038769 -2.7451072 -2.0863375 -1.4275678 -0.7687980 -0.1100283
[7] 0.5487414 1.2075111 1.8662808 2.5250506 3.1838203
>
> invisible(hist(x, breaks = b, include.lowest = TRUE, plot = FALSE))
Warning message:
argument 'include.lowest' is not made use of in: hist.default(x,
breaks = b,
2005 May 24
1
Contingency tables from data.frames
Dear list,
I'm trying to do a set of generic functions do make contingency tables from
data.frames. It is just running "nice" (I'm learning R), but I think it can be
better.
I would like to filter the data.frame, i.e, eliminate all not numeric variables.
And I don't know how to make it: please, help me.
Below one of the my functions ('er' is a mention to EasieR,
2007 Nov 28
1
Histograms and Sturges rule
Dear All,
According to the Sturges rule, the number of classes of a histogram is
the closest integer to
1 + logb(n,base=2)
where n is the number of observations. The function hist(), by
default, uses the Sturges rule. However, the code
x <- 1:200
hist(x)
produces a histogram with 10 classes and not 9 classes as determined
by the Sturges rule. What am I missing?
Thanks in advance,
Paul
2005 Jul 07
1
Tables: Invitation to make a collective package
Hi All,
I would like to make an invitation to make a collective package with all
functions related to TABLES.
I know that there are many packages with these functions, the original idea is
collect all this functions and to make a single package, because is arduous for
the user know all this functions broadcast in many packages.
So, I think that the original packages can continue with its
2010 Jun 18
4
Root mean square on binned GAM results
Hi,
Standard correlations (Pearson's, Spearman's, Kendall's Tau) do not
accurately reflect how closely the model (GAM) fits the data. I was told
that the accuracy of the correlation can be improved using a root mean
square deviation (RMSD) calculation on binned data.
For example, let 'o' be the real, observed data and 'm' be the model data. I
believe I can calculate
2008 Jun 23
5
Need ideas on how to show spikes in my data and how to code it in R
Hi
I have recently been analyzing birthweight data from a clinic. The
data has obvious defects in that there is digit preference on certain
weights making them overrepresented. This shows as spikes in the
histogram on certain well rounded weights like 2, 2.5, 3, etc. I
would like to show this to government officials but can't figure out
how I should present the finding in an easy to
2011 Jan 16
3
rootogram for normal distributions
Using R-2.12.1 and latticeExtra-0.6-14, I would like to understand
why a rootogram displaying samples from the Poisson distribution looks like I
expected it, whereas a rootogram using the normal distribution does not:
library(latticeExtra)
rootogram(~rpois(1000, lambda = 50), dfun = function(x) dpois(x, lambda = 50))
rootogram(~rnorm(1000), dfun = function(x) dnorm(x,mean(x),sd(x)))
I
1998 Jan 23
2
hist: rel.freqs
In R0.61,
In hist(), should the line
rel.freqs <- counts/(sum(x) * diff(breaks))
computing the relative frequencies or height of the rectangles
in a histogram not be
rel.freqs <- counts/(sum(counts) * diff(breaks))
instead, or do I misunderstand something?
Thanks,
Philippe
--
--------------------------------------------------------
Philippe Lambert Tel:
2003 Jan 31
3
hist (PR#2512)
The command hist(c(2,2,2,4,5,6)) returns a histogram that looks incorrect -- 3 in the bin labeled 2 on the left, but 1 each in the bins labeled 3,4,5 on the left.
Thanks!
Pam Surko
--------------------
> version
_
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status
major 1
minor
2008 May 20
2
hist clarification
Can someone help me with a misunderstanding I'm having with hist? I
expected, from the example below, that the number of bins would always be 10
and the length of the counts array the same. According to the help section
'breaks' can be a integer indicating the number of bins. From the example
below, the number of bins (length of the counts array) varies. Am I wrong in
expecting the
2007 Mar 20
1
truehist bug?
Hi,
Is this a bug in truehist()?
> library(MASS)
> x <- rep(1, 10)
> truehist(x)
Error in pretty(data, nbins) : invalid 'n' value
Thanks,
Gad
> R.version
platform i486-pc-linux-gnu
arch i486
os linux-gnu
system i486, linux-gnu
status
major 2
minor 4.1
year 2006
month 12
day 18
svn
2007 Mar 20
1
truehist bug?
Hi,
Is this a bug in truehist()?
> library(MASS)
> x <- rep(1, 10)
> truehist(x)
Error in pretty(data, nbins) : invalid 'n' value
Thanks,
Gad
> R.version
platform i486-pc-linux-gnu
arch i486
os linux-gnu
system i486, linux-gnu
status
major 2
minor 4.1
year 2006
month 12
day 18
svn
2009 Nov 06
2
Binning of integers with hist() function odd results (PR#14046)
Full_Name: Gerald Guglielmo
Version: 2.8.1 (2008-12-22)
OS: OSX Leopard
Submission from: (NULL) (131.225.103.35)
When I attempt to use the hist() function to bin integers the behavior seems
very odd as the bin boundary seems inconsistent across the various bins. For
some bins the upper boundary includes the next integer value, while in others it
does not. If I add 0.1 to every value, then the