[R] Bug of pmvnorm?

2006-05-27 Thread Daniel Yang
Dear R-help, Is the following a bug of pmvnorm? R-matrix(c(1,.5,.5,1),2,2) pmvnorm(lower=c(-Inf,-Inf),upper=c(Inf,Inf),corr=R) It returns, [1] 0 attr(,error) [1] 0 attr(,msg) [1] Normal Completion But I think it should return 1. Yung-jui __

[R] The beautiful math plot

2006-04-26 Thread Daniel Yang
Dear R-help, How can I replicate the beautiful math plot found in the right-hand side of http://www.r-project.org/screenshots/desktop.jpg? I tried the following code but didn't obtain something as beautiful. r - seq(-10, 10, len=100) y - cos(r^2)*exp(-r/6) par(pty=s) plot(r,y,type=l) Thanks

[R] The beautiful math plot

2006-04-26 Thread Daniel Yang
Dear R-help, How can I replicate the beautiful math plot found in the right-hand side of http://www.r-project.org/screenshots/desktop.jpg? I tried the following code but didn't obtain something as beautiful. r - seq(-10, 10, len=100) y - cos(r^2)*exp(-r/6) par(pty=s) plot(r,y,type=l) Thanks

[R] About regression and plot

2006-04-26 Thread Daniel Yang
Dear R-help, This is my first R day. I want to ask some more beginner's questions. Q1. How can I obtain the covariance matrix for parameter estimates of a multiple regression? I checked ?lm but didn't get the information. Q2. How can I see the old graphs in the graph window? Q3. Can R plot

[R] About regression and plot

2006-04-26 Thread Daniel Yang
--- I changed to format to text instead of html --- Dear R-help, This is my first R day. I want to ask some more beginner's questions. Q1. How can I obtain the covariance matrix for parameter estimates of a multiple regression? I checked ?lm but didn't get the information. Q2. How can I see