similar to: Inversion function of dnorm ?

Displaying 20 results from an estimated 8000 matches similar to: "Inversion function of dnorm ?"

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:
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
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
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
2006 Oct 09
2
shifting a huge matrix left or right efficiently ?
I'm wondering what's the best way to shift a huge matrix left or right. My current implementation is the following: shiftMatrixL <- function(X, shift, padding=0) { cbind(X[, -1:-shift], matrix(padding, dim(X)[1], shift)) } X <- shiftMatrixL(X, 1)*3 + shiftMatrixL(X,2)*5... However, it's still slow due to heavy use of this function. The resulting matrix will only be read once
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)
2010 Apr 09
2
lattice background grid
Hi, I wonder if anyone knows how to control color and darkness of the background grid generated by ' type = c("g", "p") ' in a lattice plot (e.g., in xyplot). The documentation does not seem to offer a way to change them. Thanks a lot! Wen
2012 Jun 18
3
(1-1e-100)==1 true?
Hi, This problems has bothered me for the lase couple of hours. > 1e-100==0 [1] FALSE > (1-1e-100)==1 [1] TRUE How can I tell R that 1-1e-100 does not equal to 1, actually, I found out that > (1-1e-16)==1 [1] FALSE > (1-1e-17)==1 [1] TRUE The reason I care about this is that I was try to use qnorm() in my code, for example, > qnorm(1e-100) [1] -21.27345 and if I want to
2009 Sep 06
3
linear mixed model question
Hello, I wanted to fit a linear mixed model to a data that is similar in terms of design to the 'Machines' data in 'nlme' package except that each worker (with triplicates) only operates one machine. I created a subset of observations from 'Machines' data such that it looks the same as the data I wanted to fit the model with (see code below). I fitted a model in
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
2010 May 06
2
Derivative of the probit
Is there a function to compute the derivative of the probit (qnorm) function in R, or in any of the packages? Thanks, -Andrew [[alternative HTML version deleted]]
2003 Oct 31
4
dnorm() lead to a probability >1
Howdee, One of my student spotted something I can't explain: a probability >1 vs a normal probability density function. > dnorm(x=1, mean=1, sd=0.4) [1] 0.9973557 > dnorm(x=1, mean=1, sd=0.39) [1] 1.022929 > dnorm(x=1, mean=1, sd=0.3) [1] 1.329808 > dnorm(x=1, mean=1, sd=0.1) [1] 3.989423 > dnorm(x=1, mean=1, sd=0.01) [1] 39.89423 > dnorm(x=1, mean=1, sd=0.001) [1]
2012 Jul 24
4
Integrate(dnorm) with different mean and standard deviation help
I'm trying to provide different parameters to the integrate function for various probability functions. I'm using dnorm as the simplest example here. For instance integrate(dnorm, -1.96, 1.96) produces the correct answer for a normal distribution with mean 0 and standard deviation 1. I've tried two ways to use mean=2.0 and standard deviation 1, but with no luck. The examples follow.
2010 Sep 23
2
dnorm
Dear R-users Idea: Plot a dnorm line using specific mean/sd to complete a histogram (skewed). xs:range of y-values, ys: dnorm function Problem: I expected to multiply the ys function with the sample size (n=250-300). I was wondering about a factor between 12'000 and 30'000 to match the size of the dnorm line with the specific histogram. Thanks Sibylle hist(Biotree[Ld,]$Height2008,
2006 Jan 20
2
big difference in estimate between dmvnorm and dnorm, how come?
Dear R community, I was trying to estimate density at point zero of a multivariate distribution (9 dimensions) and for this I was using a multinormal approximation and the function dmvnorm , gtools package. To have a sense of the error I tried to look the mismatch between a unidimensional version of my distribution and estimate density at point zero with function density, dmvnorm and dnorm. At
2007 Feb 26
3
returns from dnorm and dmvnorm
Hi All, Why would calls to dnorm and dmvnorm return values that are above 1? For example, > dnorm(0.00003,mean=0, sd=0.1) [1] 3.989423 This is happening on two different installations of R that I have. Thank you. Hailu [[alternative HTML version deleted]]
2005 Feb 10
2
Curious Behavior with Curve() and dnorm()
I am attempting to wrap the histogram function in my own custom function, so that I can quickly generate some standard plots. A part of what I want to do is to draw a normal curve over the histogram: > x <- rnorm(1000) > hist(x, freq=F) > curve(dnorm(x), lty=3, add=T) (for normal use, x would be a vector of empirical values, but the rnorm() function works for testing) That
2019 Dec 07
2
What should dnorm(0, 0, -Inf) return?
Hi, Apropos of a recent Inf question, I've previously wondered if dnorm "does the right thing" with dnorm(0, 0, -Inf) which gives zero. Should that be zero or NaN (or NA)? The help says "'sd < 0' is an error and returns 'NaN'" and since -Inf < 0 is TRUE, then... is this a bug? Thank you, Stephen Rochester, MN USA
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
2006 Feb 10
3
Accuracy of dnorm (PR#8586)
Full_Name: Marco Vezzoli Version: 2.2.0 2.1.0 2.0.0 OS: Solaris, Windows, Linux Submission from: (NULL) (57.78.11.38) The dnorm functions yield a wrong value when the standard deviation is near to 1e-1 e.g. > dnorm(0,mean=0.04,sd=0.3) [1] 1.318039 this error is consistent in various version and os.