> -----Original Message----- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of solafah bh > Sent: Sunday, October 03, 2010 3:39 PM > To: R help mailing list > Subject: [R] sampling from normal distribution > > Hello > If i want to resampl from the tails of normal distribution , are these > commans equivelant?? > upper tail:qnorm(runif(n,pnorm(b),1)) if b is an upper tail boundary > or > upper tail:qnorm((1-p)+p(runif(n)) if p is the probability of each > interval (the observatins are divided to intervals) > > Regards > > >
Yes, they are equivalent, although the second formula is missing a closing parenthesis and a multiplication operator. You could also simplify the second formula to > qnorm(1-p*runif(n)) Hope this is helpful, Dan Daniel Nordlund Bothell ______________________________________________ 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.