search for: mathdensity

Displaying 11 results from an estimated 11 matches for "mathdensity".

2004 Jul 26
1
lattice / pdf bug ?
...me(x1=sample(c("A","B"),10,replace=TRUE), x2=c("C", rep("D",9)), y=rnorm(10)) where by having only one obs. for the first level of the second factor x2, we ensure that there won't be full combinations of x1 and x2. This seems to trip panel.mathdensity(), but only when printing to pdf, and I can't find a way to avoid it. Consider stopifnot(require(lattice)) stopifnot(require(grid)) pdf("testfile.pdf") Q<-data.frame(x1=sample(c("A","B"),10,replace=TRUE), x2=c("C", rep("D&quot...
2012 Jun 27
1
lattice histogram log and non log values
...00), rnorm(1000)), Type = c(rep("Base",1000),rep("Log",1000))) histogram( ~ UnitArea | Type, data = Data.X.., xlab = "Unit Area", type = "density", panel = function(x, ... ){ panel.histogram(x, ...) panel.mathdensity(dmath = dnorm, col = "black", args = list(mean=mean(x),sd=sd(x))) }, col = Colors.[color], layout = c(1, 2), scales=list(log = c(F,T),tick.number=list(8), rot = c(0, 90), x = list(relation = 'free'))) I want to plot...
2003 Oct 02
2
Query: What is 'Trellis'?
I'm an R-beginner and have found the function 'panel.mathdensity' in the full manual. R can't find the function and under 'Description' in the manual it says that they "are available in Trellis". What is it and where can I find the function? Regards, M?rten M?rten Bjellerup Doctoral Student in Economics School of Management and Econ...
2010 Aug 13
1
Lattice: Superimposing histograms with different colors and transparency effects
...g = gl(3,100,300) # Trellis parameters trellis.par.set("superpose.polygon"=list(alpha=rep(.5,3))) histogram(~x ,groups=grouping, type = "density", panel = "panel.superpose", panel.groups = function(x,...) { panel.histogram(x,...) panel.mathdensity(dmath=dnorm,args = list(mean=mean(x),sd=sd(x)),...) }) Besides transparency, I get no filling colors at all in the, even though plot.polygon and superpose.polygon parameters are set. I clearly need to define my own colors with alpha channel set: mycolors = rgb(c(228, 55, 77),...
2009 Feb 03
2
Lattice histogram with vertical lines
I would like to add some vertical lines to a lattice plot of histograms. What I am after is a lattice version of abline(v = 1234). The lattice histogram plot is just: histogram( ~ LTSE | approach, data = arrivals) Can anyone point me in the right direction for this? David Scott _________________________________________________________________ David Scott Department of Statistics The
2007 Mar 08
2
curve of density on histogram
...p, col="steelblue", panel = function(x, ...){ std <- if(length(x) > 0) format(round(sd(x), 2), nsmall = 2) else "NA" n <- length(x) m <- if(length(x) > 0) format(round(mean(x), 2), nsmall = 2) else "NA" panel.histogram(x, ...) panel.mathdensity(dmath = dnorm, col = "green", args = list(mean=mean(x),sd=sd(x))) panel.abline(v= mean(x), col = "red") panel.xyplot(x = jitter(x),type="p",pch=20,y = rep(0, length(x)), col='yellow' ) x1 <- unit(1, "npc&quot...
2006 Sep 01
3
histograms
...lis.par.set(sundar.theme()) print( # necessary if the file is source()'d histogram( ~ height | voice.part, data = singer, xlab = "Height (inches)", type = "density", panel = function(x, ...) { panel.histogram(x, ...) panel.mathdensity(dmath = dnorm, col = "black", args = list(mean=mean(x),sd=sd(x))) } ) ) Thanks ../Murli [[alternative HTML version deleted]]
2001 Aug 27
1
Error meesage from RGUI
...("Estimated Density", cex = 2, col = "DarkOliveGreen"), panel = function(x, ...) { panel.xyplot(x = jitter(x), y = rep(0, length(x))) panel.densityplot(x, ...) panel.mathdensity(dmath = dnorm, args = list(mean=mean(x),sd=sd(x))) } ) This seem to execute OK, but when I went to look at the graphs, I had the "recording" turned on, and when I tried to PgUp to the first graph, I got the error message: RGUI.EXE...
2011 Feb 16
2
how to create normalized pdf plot?
Hello, I have multiple data files. Each file contains a single column and 1.5 million rows. I want to create normalized pdfs (area under curve is 1) and histograms to compare with one another. Could anybody suggest if there exists an easy way or built in function in R. At present I am using Origin and Excel together to do this. A single file needs 10 minutes and I have a total of 929 files! So
2005 Sep 25
4
hist(x, ...) with normal distribution curve
. I am looking for a histogram or box plot with the adding normal distribution curve I think that must be possible, but I am not able to find out how to do. Regards Knut
2007 Sep 10
1
overlay lattice histograms with goodness-of-fit pdfs
Hello, I am new to R exploratory data analysis and plotting. Is anyone aware of a way to overlay a set of conditional histograms with conditional PDFs? Below, I generate a lattice plot of precipitation histograms based on different months and stations, given a subset of the dataset: histogram(~ data | month * station, data = sta.stack[sta.stack[,"type"]=="precip" &