[R] Recommendation on a probability textbook (conditional probability)

2009-10-16 Thread Peng Yu
I need to refresh my memory on Probability Theory, especially on conditional probability. In particular, I want to solve the following two problems. Can somebody point me some good books on Probability Theory? Thank you! 1. Z=X+Y, where X and Y are independent random variables and their distributi

Re: [R] Recommendation on a probability textbook (conditional probability)

2009-10-16 Thread Peng Yu
What's the title? On Fri, Oct 16, 2009 at 8:16 PM, Yi Du wrote: > Hogg's book is enough for you considering your problems. > > Yi > > On Fri, Oct 16, 2009 at 7:12 PM, Peng Yu wrote: >> >> I need to refresh my memory on Probability Theory, especially on >> conditional probability. In particular,

Re: [R] Recommendation on a probability textbook (conditional probability)

2009-10-16 Thread Ista Zahn
On Fri, Oct 16, 2009 at 9:37 PM, Peng Yu wrote: > What's the title? Introduction to Probability. > > On Fri, Oct 16, 2009 at 8:16 PM, Yi Du wrote: >> Hogg's book is enough for you considering your problems. >> >> Yi >> >> On Fri, Oct 16, 2009 at 7:12 PM, Peng Yu wrote: >>> >>> I need to refres

[R] avoiding loops in equation

2009-10-16 Thread Julius Tesoro
To illustrate my problem, I have a complex code of several matrices and a vector. To simplify I only used two matrices and a vector as an example: pex<-function(acc, pga, std){ (acc-pga)/std } acc<-seq(.1,1,.1) pga<-matrix(rnorm(9,4,.1),3,3) std<-matrix(rnorm(9,4,.5),3,3) I tried calculating

Re: [R] Beveridge-Nelson decomposition

2009-10-16 Thread Ben Bolker
sdlywjl666 wrote: > > Dear all, > Is there some function in R to carry out Beveridge-Nelson > decomposition? > Is there some function in R to carry out seasonal adjustments of time > series? > Is there some function in R to carry out x11 or x12 seasonal adjustments ? > > RSiteSearch("Bev

Re: [R] length error using tapply()

2009-10-16 Thread Ben Bolker
George Aldridge wrote: > > I am new to R and trying to aggregate a character variable. I have > searched, and tapply() seems to hold the best hope, but I am having > trouble with it. I have a character variable 'hab' and 3 factors all of > the same length: > >> length(hab) > [1] 105219 >> leng

Re: [R] Generating a stochastic matrix with a specified second dominant eigenvalue

2009-10-16 Thread David Winsemius
A further idea: Consider the triangular square matrices of the form with decreasing eigenvalues on the diagonal: 1 0 0 0 0 0 .3 .7 0 0 0 0 .4 .2 .4 0 0 0 .2 .4 .2 .2 0 0 .1 .3 .4 .2 .1 0 .2 .2 .2 .2 .1 .1 This would have the specified eigenvalue compo

Re: [R] Different way of scaling data

2009-10-16 Thread Greg Snow
Read the whole help page for scale, then try: Newx <- scale(x, min(x), max(x)-min(x) ) -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- >

Re: [R] Recommendation on a probability textbook (conditional probability)

2009-10-16 Thread Peng Yu
There are many examples in the book. Since I'm refreshing my memory. Is there a more concise one? On Fri, Oct 16, 2009 at 8:26 PM, Ista Zahn wrote: > I like Grinstead and Snell, not least because it's free: > http://www.dartmouth.edu/~chance/teaching_aids/books_articles/probability_book/book.html

Re: [R] How to right-align labels in dotchart

2009-10-16 Thread Peter Ehlers
Sean Carmody wrote: Thanks very much John, that works. I had tried using las=1 inside the dotchart function itself, but it seems to be one of those occasions where the par parameter is over-ridden by the main plotting function. You can see the results here: http://www.stubbornmule.net/2009/10/a

Re: [R] Urgent help requested to modify a script

2009-10-16 Thread Jim Lemon
On 10/16/2009 11:01 PM, one2luv wrote: I am hoping someone will tak up this chalenge (I am new to R) I have inheritied an R script but need to change it. The script currently includes hardcoded file locations on lines 12,166 and 167. I need to modify this script to allow the folder to be passed

<    1   2