Re: [R] Generate multivariate normal data with a random correlation matrix

2011-02-10 Thread Rick DeShon
istribution of correlation matrices in mind > to begin with, which doesn't seem to be the case. > > > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of Szumiloski, John > Sent: Wednesday, February 09, 2

[R] Generate multivariate normal data with a random correlation matrix

2011-02-09 Thread Rick DeShon
Hi All. I'd like to generate a sample of n observations from a k dimensional multivariate normal distribution with a random correlation matrix. My solution: 1) The lower (or upper) triangle of the correlation matrix has n.tri=(d/2)(d+1)-d entries. 2) Take a uniform sample of n.tri possible correl

[R] Generate multivariate normal data with a random correlation matrix

2011-02-09 Thread Rick DeShon
Hi All. I'd like to generate a sample of n observations from a k dimensional multivariate normal distribution with a random correlation matrix. My solution: The lower (or upper) triangle of the correlation matrix has n.tri=(d/2)(d+1)-d entries. Take a uniform sample of n.tri possible correlations

[R] nlsList {nlme} - control arguments problem

2009-06-29 Thread Rick DeShon
HS, data) {   xy     <- sortedXyData(mCall[["x"]],LHS,data)   min.s  <- min(y)   dif.s  <- max(y)-min(y)   dplt.s <- 0.5   p.s    <- -.20   value  <- c(min.s, dplt.s, dif.s, p.s)   names(value) <- mCall[c("min","dplt","dif","p&

[R] replace zeros in a block diagonal matrix with small random values?

2009-02-24 Thread Rick DeShon
Hi All. Imagine you have a large block diagonal matrix. I'd like to replace the zeros in this matrix with small random (runif) numbers. Any ideas for a simple and efficient way to do this? Best regards, Rick DeShon __ R-help@r-project.org ma

[R] NLS plinear question

2008-05-06 Thread Rick DeShon
582 residual sum-of-squares: 555915 Number of iterations to convergence: 11 Any idea why having a zero for the first value of X causes this problem? Thanks in advance, Rick DeShon [[alternative HTML version deleted]] __ R-help@r-projec

[R] nlsList (nlme) error

2008-01-25 Thread Rick DeShon
;"8"<"30"<..: 41 11 33 22 4 27 5 2 37 19 ... $ trial: int 1 1 1 1 1 1 1 1 1 1 ... $ ACC : int 1 0 1 1 1 0 1 1 1 1 ... $ RT : int NA 1309 544 654 NA 441 882 1097 898 ... $ block: int 1 1 1 1 1 1 1 1 1 1 ... - attr(*, "formula")=Class 'formul

[R] Efficient computation of average covariance matrix over a list

2007-12-03 Thread Rick DeShon
cient way to compute the average covariance matrix over the list members in "lcov"? Thanks in advance, Rick DeShon __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-

[R] Efficient computation of average covariance matrix over a list

2007-12-03 Thread Rick DeShon
Hi All. I would like to compute a separate covariance matrix for a set of variables for each of the levels of a factor and then compute the average covariance matrix over the factor levels. I can loop through this computation but I need to perform the calculation for a large number of levels and

[R] How to remove index from list after split?

2007-09-14 Thread Rick DeShon
In the following example, how can I drop the group index from the list after I perform a split? n <- 3 nn <- 10 g <- factor(round(n * runif(n * nn))) x <- rnorm(n * nn) + sqrt(as.numeric(g)) df<- data.frame(g,x) df.s <- split(df,g) Thanks! Rick DeShon