Displaying 20 results from an estimated 34 matches for "sturg".
Did you mean:
stugg
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
b...
2008 May 19
2
How hist() decides breaks?
...of cells for the
histogram,
* a character string naming an algorithm to compute the
number of cells (see Details),
* a function to compute the number of cells.
In the last three cases the number is a suggestion only.
B)
The default for 'breaks' is '"Sturges"': see 'nclass.Sturges'.
If I look at the code for nclass.Sturges() I see
function (x) ceiling(log2(length(x)) + 1)
and, for length(X) = 10000, this gives 15. This is not related
to any of the numbers of breaks I actually got, in any way obvious
to me.
So:
Question 1: hist(...
2005 May 24
1
Contingency tables from data.frames
...the my functions ('er' is a mention to EasieR, because I'm trying
to do a package for myself and the my students):
#2. Tables from data.frames
#2.1---er.table.df.br (User define breaks and right)------------
er.table.df.br <- function(df,
breaks = c('Sturges', 'Scott', 'FD'),
right = FALSE) {
if (is.data.frame(df) != 'TRUE')
stop('need "data.frame" data')
dim_df <- dim(df)
tmpList <- list()
for (i in 1:dim_df[2]) {
x <- as.matrix(df[ ,i])...
2005 Jul 07
1
Tables: Invitation to make a collective package
...# Make final table
names(res) <- c('Class limits', 'fi', 'fr', 'fr(%)', 'fac', 'fac(%)')
return(res)
}
#
# Common function
#
tb.make.table.II <- function (x,
k,
breaks=c('Sturges', 'Scott', 'FD'),
right=FALSE)
{
x <- na.omit(x)
# User defines only x and/or 'breaks'
# (x, {k,}[breaks, right])
if (missing(k)) {
brk <- match.arg(breaks)
switch(brk,
Sturges = k <- nclass.S...
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 = 45, col = NULL, border = NULL,
+ main = paste("Histogram of" , V1name),
+ V1lim = range(breaks), ylim = NULL,
+ V1lab = V1name, ylab,
+ axes = TRUE, plot = TRUE, la...
2011 Mar 03
3
Probabilities greather than 1 in HIST
...m 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", ylab="Probabilidade")
curve(dnorm(x,mean=mean(xbar),sd=sd(xbar)),add=TRUE,lwd=2,col="red")
The problem is that I am getting greater than 1 probabilities in the Y axis?
Is there a way to correct this?
Man...
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!
2005 Aug 31
2
SpanDSP rxfax TSID variable name?
Scott's SpanDSP FAQ mentions that the senders' TSID (20 bytes sent by
sending fax machine) is made available, but doesn't mention where or
how. Is there a variable or something that's set? I didn't see it in
http://www.voip-info.org/tiki-index.php?page=Asterisk+variables
Thanks,
Woody
2003 Apr 02
1
normalized frequency histogram
...ncy by the size of the intervals being used.
So I could divide the series by this interval length, and then plot the
relative frequency.
The problem is determining the interval length that will be used in
advance. I'm supposed to manually pick the # of intervals between 20
and 40 (not use sturges). However, when I try different values for the
nbreaks parameters, incrementing from 20 - 40, the histogram only
changes at a couple of points on that interval.
Anyone have any suggestions as to how I should create this plot? Or an
explanation as to why my nbreaks parameter does not seem to...
2009 Jun 30
0
(no subject)
...y default??
No it defaults to nothing. Type ls() to see this.
You must explicitly name the variable: V1 <- whatever
Be careful, you likely are reading it in as a data.frame. Try class(V12) or str(V1) to see what data structure you have.
Then I tried
>
> > hist(V1, breaks = "Sturges",
> +????? freq = NULL, probability = !freq,
> +????? include.lowest = TRUE, right = TRUE,
> +????? density = NULL, angle = 45, col = NULL, border
> = NULL,
> + main = paste("Histogram of" , V1name),
> + V1lim = range(breaks), ylim = NULL,
> + V1lab = V1name, y...
2005 Oct 20
1
having scaling problems with a histogram
.../><o:p></o:p>
I would like to create a histogram from a data collumn consisting of 4 classes (0; 0.05;0.5;25;75). Due to the difference in scale the classes 0;0.05 and 0.5 are displayed within one combined bin by default with the code:Hist(x, scale="percent", breaks="Sturges"). How can I display them all, or as unique classes, leaving out the rest of the x_axes scale? There was no enlightenment in the help function and the command : breaks=5 did not do the trick.<o:p></o:p>
Thanks in advance <o:p></o:p>
Chris<o:p></o:p>
V...
2006 Nov 10
0
typo in hist.Rd (PR#9355)
...misspelled (as 'Friedman') in
src/library/graphics/man/hist.Rd. As a result, the help page currently
implies that
breaks = "Fried"
is a valid argument to hist, but results in an error:
> hist(rnorm(100), breaks = "Fried")
Error in match.arg(tolower(breaks), c("sturges", "fd", "freedman-diaconis", :
'arg' should be one of sturges, fd, freedman-diaconis, scott
> sessionInfo()
R version 2.5.0 Under development (unstable) (2006-11-06 r39797)
i686-pc-linux-gnu
...
2010 Jun 18
4
Root mean square on binned GAM results
...m, 5 ) ) ^ 2 )
I have read the help for ?cut, ?table, ?hist, and ?split, but am stumped for
which one to use in this case--if any.
How do you calculate c( mean(o[1:5]), mean(o[6:10]), ... ) for an arbitrary
length vector using an appropriate number of bins (fixed at 5, or perhaps
calculated using Sturges' formula)?
I have also posted a more detailed version of this question on
StackOverflow:
http://stackoverflow.com/questions/3073365/root-mean-square-deviation-on-binned-gam-results-using-r
Many thanks.
Dave
[[alternative HTML version deleted]]
2003 Jan 08
4
weird breaks in hist (PR#2431)
Full_Name: Reinhold Koch
Version: 1.6.1
OS: redhat 8.0
Submission from: (NULL) (131.152.84.111)
I came across rather weird behavior of the breaks in hist:
hist(1:3)
gives the expected result, besides an unnecessary gap between 2nd and 3rd
column
hist(1:4)
always merges up the first two columns, also if I resort to
hist.default(1:4,breaks=1:4). hist.default(1:4, include.lowest=F) gives an
2010 Jul 15
0
Histogram with two groups on the same graph (not on separate panels)
...quot;D:\\data
12.24.06\\AllMamushiCorrected5.8.10_7.12.10.csv", header=TRUE, strip.white=TRUE,
na.strings="")
attach(gb)
superhist2pdf <- function(x, filename = "super_histograms.pdf",
dev = "pdf", title = "Superimposed Histograms", nbreaks ="Sturges") {
junk = NULL
grouping = NULL
for(i in 1:length(x)) {
junk = c(junk,x[[i]])
grouping <- c(grouping, rep(i,length(x[[i]]))) }
grouping <- factor(grouping)
n.gr <- length(table(grouping))
xr <- range(junk)
histL <- tapply(junk, grouping, hist, breaks=nbreaks, plot = FALSE)
max...
2012 Oct 05
1
avoid <<- in specific case
...s and cannot judge the importance yet.)
I'd be very thankful for any hints!
Berry
PS: I recently read about barcharts in lattice, but by now I'm already used to my function. (And I learned a lot writing it a couple of years ago).
# Function
horiz.hist <- function(Data, breaks="Sturges", col="transparent", las=1,
ylim=range(HBreaks), labelat=pretty(ylim), labels=labelat, border=par("fg"), ... )
{a <- hist(Data, plot=FALSE, breaks=breaks)
HBreaks <- a$breaks
HBreak1 <- a$breaks[1]
hpos <<- function(Pos) (Pos-HBreak1)*(length(HBrea...
2008 Oct 21
5
how to plot the histogram and the curve in the same graph
i want to plot the histogram and the curve in the same graph.if i have a set
of data ,i plot the histogram and also want to see what distribution it
was.So i want to plot the curve to know what distribution it like.
--
View this message in context: http://www.nabble.com/how-to-plot-the-histogram-and-the-curve-in--the-same-graph-tp20082506p20082506.html
Sent from the R help mailing list archive at
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
2006 Mar 07
5
MWI, SER and asterisk
I have my peers registered to SER.asterisk seems to be sending mwi for
the peers seen in the sip show peers CLI command. i have my ser server
registered with asterisk as a type=friend and all clients register to
ser.how do i get mwi to work for these clients registered to SER.
Thank you,
-AA