Hey Guys, i have the sample variances for 1000 samples, and i want to fit it to a chi-squared distribution. after making a loop for the simulation initially, i have the following code to compute the variances samples = replicate(n, rnorm(m, 0, 1), simplify=FALSE) variances = sapply(samples, var) summary(variances) can someone please help me fit this to a chi-squared distribution with n degrees of freedom. Thanks a lot _________________________________________________________________ [[elided Hotmail spam]] [[alternative HTML version deleted]]
On Tue, 19 May 2009 14:04:19 +1000 Kon Knafelman <konk2001 at hotmail.com> wrote: KK> i have the sample variances for 1000 samples, and i want to fit it KK> to a chi-squared distribution. KK> can someone please help me fit this to a chi-squared distribution KK> with n degrees of freedom. Thanks a lot Dear Kon, 1. please only mail to <r-help at stat.math.ethz.ch> OR to <r-help at r-project.org> as we receive every mail of you twice if you mail to both. 2. please read the posting guide. A link is attached every e-mail: "PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code." especially the section "do your homework". It means use search on r-project.org and rseek.org and have a look at the documentation. Don't expect others to do your homework. And show some effort! Using search would have pointed you to a guide of Ricci on fitting distributions for example: http://cran.r-project.org/doc/contrib/Ricci-distributions-en.pdf If you programmed something and it does not work as expected- THEN mail to the list. hth Stefan PS You don't know Debbie Zhang by coincidence?...