similar to: implementation of split or two-piece normal distribution?

Displaying 20 results from an estimated 20000 matches similar to: "implementation of split or two-piece normal distribution?"

2011 Mar 29
2
normal distribution and floating point traps (?): unexpected behavior
dear all, here's a couple of questions that puzzled me in these last hours: ##### issue 1 qnorm(1-10e-100)!=qnorm(10e-100) qnorm(1-1e-10) == -qnorm(1e-10) # turns on to be FALSE. Ok I'm not a computer scientist but, # but I had a look at the R inferno so I write: all.equal(qnorm(1-1e-10) , -qnorm(1e-10)) # which turns TRUE, as one would expect, but all.equal(qnorm(1-1e-100) ,
2007 Jan 26
1
Bayesian inference: Poisson distribution with normal (!) prior
Hello, for a frequency modelling problem I want to combine expert knowledge with incoming real-life data (which is not available up to now). The frequency has to be modelled with a poisson distribution. The parameter lambda has to be normal distributed (for certain reasons we did not NOT choose gamma althoug it would make everything easier). I've started with the subsequent two functions to
2005 Dec 10
2
Problems with integrate
Hi, Having a weird problem with the integrate function. I have a function which calculates a loss density: I'd like to integrate it to get the distribution. The loss density function is: lossdensity<-function(p,Beta,R=0.4){ # the second derivative of the PDF # p is the default probability of the pool at which we are evaluating the lossdensity # Beta is the correlation with the market
2007 Jun 25
3
How to shadow 'power' area?
Dear all, Suppose I plot two normal distributions (A and B) side by side and add vertical line which hipotheticaly represent alpha value; e.g.: x <- seq(-3.5,5, length=1000) y <- dnorm(x) # Plot distribution A plot(y~x, type='l',axes=F,xlab="",ylab="",lwd=2) # Plot distribution B y2 <- dnorm(x-1.5) lines(y2~x,lwd=2) # Plot vertical line for alpha value
2010 Nov 12
4
dnorm and qnorm
Hello all, I have a question about basic statistics. Given a PDF value of 0.328161, how can I find out the value of -0.625 in R? It is like reversing the dnorm function but I do not know how to do it in R. > pdf.xb <- dnorm(-0.625) > pdf.xb [1] 0.328161 > qnorm(pdf.xb) [1] -0.444997 > pnorm(pdf.xb) [1] 0.628605 Many thanks, Edwin -- View this message in context:
2011 May 30
1
Error in minimizing an integrand using optim
Hi, Am not sure if my code itself is correct. Here's what am trying to do: Minimize integration of a function of gaussian distributed variable 'x' over the interval qnorm(0.999) to Inf by changing value of parameter 'mu'. mu is the shift in mean of 'x'. Code: # x follows gaussian distribution # fx2 to be minimized by changing values of mu # integration to be done over
2010 Oct 03
2
sampling from normal distribution
Hello If i want to resampl from the tails of normal distribution , are these commans equivelant??   upper tail:qnorm(runif(n,pnorm(b),1))  if b is an upper tail boundary   or   upper tail:qnorm((1-p)+p(runif(n))  if p is the probability of each interval (the observatins are divided to intervals)   Regards [[alternative HTML version deleted]]
2007 Apr 20
1
Estimating a Normal Mixture Distribution
Hi everyone, I am using R 2.4.1 on a MacOS X ("Tiger") operating system. In the last few day I was trying to estimate the parameters of a mixture of two normal distributions using Maximum Likelihood. The code is from Modern Applied Statistics with S (4th edition), chapter 16 ("Optimization"), the dataset is available under MASS in R. Unfortunately, when I tried out the
2000 Jan 12
1
Usage of p/d/qnorm
Hello, could You please help: I am looking for a way to formulate test accuracy measures such as test sensitivity, specificity, predictive values, and correct classification rate using p/d/qnorm. The tests' primary values follow a bimodal distribution, which is modelled by a mixture of two normal distributions: p * dnorm ((x - u1) / s1) / s1 + (1 - p) * dnorm ((x - u2) / s2) / s2)
2006 Feb 08
1
Mixture normal distribution
Dear R helper, I hope that u can help me to sort out my problem because I sent an E-mail last night to R-list but I have not receive any help and at the same time I think this problem is not so hard. I have used the following functions before > K<-10 > prime<-c(2,3,5,7,11,13,17) > UN<-seq(1:K)%*%t(sqrt(prime)) > U1<-UN-as.integer(UN) > U<-matrix(qnorm(U1),K,7)
2007 Jan 21
5
Integration + Normal Distribution + Directory Browsing Processing Questions
Hi everyone, I am new to R, but it's really great and helped me a lot! But now I have 2 questions. It would be great, if someone can help me: 1. I want to integrate a normal distribution, given a median and sd. The integrate function works great BUT the first argument has to be a function so I do integrate(dnorm,0,1) and it works with standard m. and sd. But I have the m and sd given.
2010 Jul 06
1
plotmath vector problem; full program enclosed
Here's another example of my plotmath whipping boy, the Normal distribution. A colleague asks for a Normal plotted above a series of axes that represent various other distributions (T, etc). I want to use vectors of equations in plotmath to do this, but have run into trouble. Now I've isolated the problem down to a relatively small piece of working example code (below). If you would
2011 Jan 08
1
Normal Distribution Quantiles
This is probably embarrassingly basic, but I have spent quite a few hours in Google and RSeek without getting a clue - probably I'm asking the wrong questions... There is this guy who has decided to walk through Australia, a total distance of 4000 km. His daily portion (mean) is 40km with an sd of 10 km. I want to calculate the number of days it takes to arrive with 80, 90, 95, 99%
2013 Jan 30
2
Integration of mixed normal distribution
Hi, I already found a conversation on the integration of a normal distribution and two suggested solutions (https://stat.ethz.ch/pipermail/r-help/2007-January/124008.html): 1) integrate(dnorm, 0,1, mean = 0, sd = 1.2) and 2) pnorm(1, mean = 0, sd = 1.2) - pnorm(0, mean = 0, sd = 1.2) where the pnorm-approach is supposed to be faster and with higher precision. I want to integrate a mixed
2011 Jun 26
3
Overlapping areas under normal distributions
Hi everyone. My problem: I've 4 distributions: A, B, C and D: #A mA=16.6 sA=3.0 #B mB=18.9 sB=3.2 #C mC=20.3 sC=2.1 #D mD=24 sD=0.8 ###Graphiques ensembles plot(function(x) dnorm(x,mA,sA),0,40,col="orange",ylim=c(0,0.5)) plot(function(x) dnorm(x,mB,sB),0,40,add=T,col="green") plot(function(x) dnorm(x,mC,sC),0,40,add=T,col="blue")
2006 Apr 23
2
distribution of the product of two correlated normal
Hi, Does anyone know what the distribution for the product of two correlated normal? Say I have X~N(a, \sigma1^2) and Y~N(b, \sigma2^2), and the \rou(X,Y) is not equal to 0, I want to know the pdf or cdf of XY. Thanks a lot in advance. yu [[alternative HTML version deleted]]
2010 Jun 26
4
integration of two normal density
Hello everyone, I have a question about integration of two density function Intuitively, I think the value after integration should be 1, but they are not. Am I missing something here ? > t=function(y){dnorm(y, mean=3)*dnorm(y/2, mean=1.5)} > integrate(t, -Inf, Inf) 0.3568248 with absolute error < 4.9e-06 Also, is there any R function or package could do multivariate integration ?
2012 Apr 07
1
Uniroot error
Dear All I am trying to find a uniroot of a function within another function (see example) but I am getting an error message (f()values at end points not of opposite sign). I was wondering if you would be able to advise how redefine my function so that I can find the solution. In short my first function calculates the intergrale which is function of "t" , I need to find the uniroot of
2008 Aug 21
1
pnmath compilation failure; dylib issue?
(1) ...need to speed up a monte-carlo sampling...any suggestions about how I can get R to use all 8 cores of a mac pro would be most useful and very appreciated... (2) spent the last few hours trying to get pnmath to compile under os- x 10.5.4... using gcc version 4.2.1 (Apple Inc. build 5553) as downloaded from CRAN, xcode 3.0... ...xcode 3.1 installed over top of above after
2005 Nov 24
1
Inversion function of dnorm ?
Hi, In R, qnorm is the inversion function of pnorm. (c.d.f) But there is no inversion function for dnorm. (p.d.f). Is there any easy (and quick) way to compute the inversion function of p.d.f in R ? Thanks ...