Dear Hannah, If I understand you correctly, you want a solution when rho is 0.5; if so,
> f <- function(x){ + pnorm(-x)*pnorm((0.5*dnorm(x)/pnorm(x)-x)/sqrt(1-0.5^2)) - 0.05 + } > uniroot(f, c(-3, 3)) $root [1] 0.8031289 $f.root [1] -1.565857e-06 $iter [1] 11 $estim.prec [1] 6.103516e-05 I hope this helps, John -------------------------------- John Fox Senator William McMaster Professor of Social Statistics Department of Sociology McMaster University Hamilton, Ontario, Canada web: socserv.mcmaster.ca/jfox > -----Original Message----- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of li li > Sent: June-12-10 8:31 PM > To: r-help > Subject: [R] help with R > > 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? > > Thank you very much! > Hannah > > [[alternative HTML version deleted]] > > ______________________________________________ > 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. ______________________________________________ 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.