[R] help computing a covariance

2004-07-02 Thread Eugene Salinas (R)
Hi everyone, (This is related to my posting on chi-squared from a day ago. I have tried simulating this but I am still unable to calculate it analytically.) Let y be an n times 1 vector of random normal variables mean zero variance 1 and x be an n times k vector of random normal variables mean

Re: [R] help computing a covariance

2004-07-02 Thread Eugene Salinas (R)
write (A'x'y)^2 = y'xAA'x'y as a weighted sum of k independent chi-squares each with one degree of freedom (since x and P have rank k), and then get what you want from the sum of the weights. Then check your result using Monte Carlo. hope this helps. spencer graves Eugene Salinas (R

[R] product of chi-sq distributions

2004-07-01 Thread Eugene Salinas (R)
Hi, Does anyone know what the expectation of the product of two chi-squares distributions is? Is the product of two chi-squared distributions anything useful (as in a nice distribution)? thanks, eugene. __ [EMAIL PROTECTED] mailing list

[R] product of two chi-squared

2004-07-01 Thread Eugene Salinas (R)
Hi, Does anyone know what the expectation of the product of two chi-squares distributions is? Is the product of two chi-squared distributions anything useful (as in a nice distribution)? thanks, eugene. __ [EMAIL PROTECTED] mailing list

Re: [R] how to take derivatives of a step function

2004-01-23 Thread Eugene Salinas (R)
delta functions - in other words it's zero 'almost everywhere' but goes crazy at the steps. Bill Venables. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Eugene Salinas (R) Sent: Friday, 23 January 2004 2:54 PM To: [EMAIL PROTECTED] Subject: [R] how to take

[R] how to take derivatives of a step function

2004-01-22 Thread Eugene Salinas (R)
Hi, I have estimated a step function and need to take the derivatives of this function at all points in the range. Does anyone know of any clever ways to do this? (I have already tried to fit a polynomial through the points in order to obtain a smooth representation and then take derivatives

[R] distribution of second order statistic

2003-12-15 Thread Eugene Salinas (R)
Hi, I am getting some weird results here and I think I am missing something. I am trying to program a function that for a set of random variables drawn from uniform distributions plots that distribution of the second order statistic of the ordered variables. (ie I have n uniform distributions

Re: [R] smoothing functions

2003-12-02 Thread Eugene Salinas (R)
2003, Eugene Salinas (R) wrote: Dear all, I am trying to program an estimator which maximizes a likelihood type objective function which is basically just lots of sums of indicator functions of data and parameters. In order to make the optimization I would like to smooth these functions. Since

[R] smoothing functions

2003-12-01 Thread Eugene Salinas (R)
Dear all, I am trying to program an estimator which maximizes a likelihood type objective function which is basically just lots of sums of indicator functions of data and parameters. In order to make the optimization I would like to smooth these functions. Since they are either 0 or 1, one