search for: logdiff

Displaying 2 results from an estimated 2 matches for "logdiff".

2012 Feb 02
1
Calculate the natural log of cdf between 2 intervals
Hello all, I was wondering if there is an R function to do the following: [*] log(pnorm(x)-pnorm(y)), where x>y. I don't want all the area under the natural log of the normal pdf less than x, I only want the area between y and x. I am aware of the ability to specify log.p=TRUE, which gives me the log of the probability that X<=x. This does not help me, because the following code:
2005 Sep 17
4
xyplot and abline
Dear All, I wonderif there is a simple way to draw a regression line in the xyplot: more specifically, let: age <- c(20:30, 31:40 ) age.cut <- cut(age, breaks = 2 ) y<- rnorm(20) x <- rnorm(20,4,1) xyplot(y ~ x| age.cut, xlab="x", ylab="y") How to draw (in the plot given by xyplot) the two regression lines (y ~ x) corresponding to the two category