similar to: Overlapping areas under normal distributions

Displaying 20 results from an estimated 1000 matches similar to: "Overlapping areas under normal distributions"

2007 Mar 13
3
Highlight overlapping area between two curves
Dear R helpers, I have a graph as following; I would like to highlight the overlapping area between the two curves. Do you know how to do this? Thank you in advance for your help. Nguyen ###START x1 <- rnorm(10000, 0.70,0.12) x2 <- rnorm(10000, 0.90,0.12) d1 <- density(x1) d2 <- density(x2) plot(range(d1$x,d2$x), range(d1$y, d2$y), type = "n", xlab = "X
2016 Jul 04
1
[PATCH] SILK: use silk_memmove for potentially overlapping areas
Fixes CID 1227580 --- silk/process_NLSFs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/silk/process_NLSFs.c b/silk/process_NLSFs.c index c27cf03..d9123ef 100644 --- a/silk/process_NLSFs.c +++ b/silk/process_NLSFs.c @@ -100,6 +100,6 @@ void silk_process_NLSFs( } else { /* Copy LPC coefficients for first half from second half */ - silk_memcpy(
2009 Apr 17
1
ColorRamp different from ColorRampPalette
I try to use ColorRamp as ColorRampPalette (i.e. with the same gradient), but it seems there is a nuance that I've missed. pal.crp<-colorRampPalette( c("blue", "white", "red"), space = "rgb") plot(rep(0,40),pch=16,col=pal.crp(40)) # is great But, using the same gradient with colorRamp is giving erratic colors. pal.cr<-colorRamp(
2012 Jul 09
1
boxplot with "cut"
Dear UseRs, I'm making box plots from a data set that looks like this: Chr Start End GeneDensity ReadCount_Explant ReadCount_Callus ReadCount_Regen 1 1 1 10000 107.82 1.243 1.047 1.496 2 1 10001 20000 202.50 0.835 0.869 0.456 3 1 20001 30000 158.80 1.813 1.529 1.131
2013 Sep 20
1
Is there a way to change x and y axis tick mark inside plot()?
Dear R community, I am having trouble changing the tick marks on y-axis to every 5 units? I have the following: x <- c(12, 16, 6, 23, 27, 8, 5, 19, 23, 13, 16, 8) y <- c(29, 29, 23, 34, 38, 24, 22, 34, 36, 27, 33, 27) plot(x, y, pch=19) Should I change ylim=c(0,40), and then use axis()? I kept on thinking I can do everything inside plot(), but there is actually axis(), par(), ..., and
2011 Mar 29
1
Multiple area plots to share the same x-axis
Hello, I asked a similar question before but in an existing thread. I am not sure if it is proper etiquette to repost a similar question as a new tread, I think in this case, it might be because this way more people can see it and perhaps learn from it. (Also, part of the existing thread became private) I want to know how to plot multiple ggplot area plots on top of one another so that the same
2010 Feb 14
2
xyplot, overlay two variables on one plot with group factors
All I want to overlay two variables on the same plot following their appropriate grouping. I have attempted to use subscripting in panel with panel.xyplot, but I can't get the grouping to follow into the panel...here is an example... dat<-data.frame( y= log(1:10), y2=10:19, x=1:10, grp = as.factor(1) ) dat2<-data.frame( y= log(10:19), y2= 20:29, x=1:10, grp = as.factor(c(2)) )
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
2005 Apr 21
9
Using R to illustrate the Central Limit Theorem
Dear All I am totally new to R and I would like to know whether R is able and appropriate to illustrate to my students the Central Limit Theorem, using for instance 100 independent variables with uniform distribution and showing that their sum is a variable with an approximated normal distribution. Thanks in advance, Paul
2011 Sep 10
1
dgamma in jags within r
I define priors in jags within r using a gamma distribution. I would like to control the shape but I have problems. Any help will be usefull. From help of dgamma ___________________ The Gamma distribution with parameters shape = a and scale = s has density f(x)= 1/(s^a Gamma(a)) x^(a-1) e^-(x/s) and rate=1/scale From jags user manual ____________________ dgamma(r, mu) has a density of
2011 May 19
1
dbetagen function in mc2d package
Hi all, I found this useful package for generalized beta, yet the function that calculates its density leaves me puzzled, especially when I plotted it: plot(function(y) dbetagen(y,4,1.2,min=0,max=40),xlim=c(0,40)) The area between the density curve and the x axis does not seem to measure 1!!! -- View this message in context:
2006 Jun 03
2
Help on plotting a 3 dimensional surface
Hi Im working on my master thesis, I need to get a plot currents distributed over a surface. I have the data listed in a dataframe with the x coordinates, y coordinates and the value. Im using the persp function but I’ve not found out how to put the data into the z1 variable es <-read.table("RDatalog_pass_dev_1_wafers_1_8V.txt",header=T,sep="\t") x1 <-
2010 Feb 21
1
how do I get the legend?
http://en.wikipedia.org/wiki/Binomial_distribution Bino Hi there, How can I get the legend in the probability density plot in that http://en.wikipedia.org/wiki/File:Binomial_distribution_pmf.svg wiki page ? and the cumalative plot as well? ==================================== # Binomial Distribution x=0:40
2006 Aug 08
1
parameter yaxs / function hist (graphics)
Dear R users, The parameters xaxs and yaxs (function par, package graphics) seem not to work with the function hist (package graphics), even when the parameters xlim and ylim are defined. Is there any way to make yaxs="i" and xaxs="i" work properly with the function hist, mainly to produce histograms that "touch" the horizontal axis? The R documentation and the R
2012 Oct 23
1
scatterplot with wrong line offset
Hi All, I'm trying to do a Scatterplot (package: car), and add a line (just for reference). There is my code: #------------------------------------Code--------------------------------------------------- library("car") library("calibrate") G_T<-c("car","bike","boat") ave<-c(80,10,45) perf<-c(100,80,75) df2<-data.frame(G_T,ave,perf)
2008 Dec 06
1
find with add of an atttributes
I have wrote this: EventDate.find(:all, :include => [:container,{:event => [:photo,:event_type_names]},{:place=>:location}], :joins =>" RIGHT JOIN (SELECT event_dates.id,date_add(event_dates.date, INTERVAL i DAY ) AS date FROM (select 0 as i union all select 0 union all select 1 union all select 2) as integers CROSS JOIN event_dates
2002 Dec 08
1
color of plot axes involving POSIX types
I am attempting to plot frequency of occurrence against (calendar) time. As the output is to be produced as a Powerpoint picture on a dark background I wish to make the plot output yellow > par(col="yellow", col.axis="yellow", col.lab="yellow", col.main="yellow") > plot(t2, t1, ylim=c(0,40), main="Episynlestes run 2",
2008 Mar 14
1
Rejection sampling to draw from distributions
Dear friends, Please find below the code that I have employed for a rejection sampler to draw from asymmetric laplace distributions. I was wondering if this code can be written more efficiently? Are there more efficient ways of drawing random numbers from asymmetric laplace distributions?? Thanks in advance for your help and have a great weekend. Regards Anup
2001 Aug 28
2
fitting a mixture of distributions with optim and max log likelihood ?
hi Suppose I have a mixture of 2 distributions generated by rtwonormals <- function(npnt,m1,s1,m2,s2,p2){ rv<-vector(npnt,mode="numeric") for( i in seq(1:npnt)){ if(runif(1,0,1)<=p2){ rv[i]<-rnorm(1,m2,s2) } else{ rv[i]<-rnorm(1,m1,s1) } } return(rv) } x <- rtwonormals(50000,0,100,500,500,0.05) #and I try to fit these with (based on thread: [R]
2013 Mar 18
2
Fit a mixture of lognormal and normal distributions
Hello I am trying to find an automated way of fitting a mixture of normal and log-normal distributions to data which is clearly bimodal. Here's a simulated example: x.1<-rnorm(6000, 2.4, 0.6)x.2<-rlnorm(10000, 1.3,0.1)X<-c(x.1, x.2) hist(X,100,freq=FALSE, ylim=c(0,1.5))lines(density(x.1), lty=2, lwd=2)lines(density(x.2), lty=2, lwd=2)lines(density(X), lty=4) Currently i am using