On Fri, Sep 14, 2012 at 9:02 AM, li li <hannah....@gmail.com> wrote: > Dear all, > Y, X are bivariate normal with all the parameters known. > I would like to generate numbers from the distribution Y | X > c > where c is a constant. > Does there exist an R function generating > random numbers from such a distribution?
Not directly, as far as I know, but you can easily simulate X|X>c by transforming uniform random numbers using the inverse CDF, and Y|X=x is univariate Normal with mean linear in x and variance independent of x. -thomas -- Thomas Lumley Professor of Biostatistics University of Auckland ______________________________________________ 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.