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.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to