[R] help with R
Berend Hasselman
bhh at xs4all.nl
Sun Jun 13 08:09:50 CEST 2010
li li-13 wrote:
>
> Hi all,
> I want to solve the following equation for x with rho <- 0.5
>
> pnorm(-x)*pnorm((rho*dnorm(x)/pnorm(x)-x)/sqrt(1-rho^2))==0.05
>
> Is there a function in R to do this?
>
Or if you wish to try different values of rho
f <- function(x, rho) {
pnorm(-x)*pnorm((rho*dnorm(x)/pnorm(x)-x)/sqrt(1-rho^2))-0.05
}
uniroot(f,c(-3,3),rho=.5)
uniroot(f,c(-3,3),rho=.3)
/Berend
--
View this message in context: http://r.789695.n4.nabble.com/help-with-R-tp2253133p2253243.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list