[R] Chi-square parameter estimation

Moshe Olshansky m_olshansky at yahoo.com
Wed Jul 30 00:55:09 CEST 2008


If v is your vector of sample variances (and assuming that their distribution is chi-square) you can define
f(df) <- sum(dchisq(v,df,log=TRUE))
and now you need to maximize f, which can be done using any optimization function (like optim).


--- On Sat, 26/7/08, Julio Rojas <jcredberry at ymail.com> wrote:

> From: Julio Rojas <jcredberry at ymail.com>
> Subject: [R] Chi-square parameter estimation
> To: r-help at r-project.org
> Received: Saturday, 26 July, 2008, 12:03 AM
> Hi. I have made 100 experiments of an M/M/1 queue, and for
> each one I have calculated both, mean and variance of the
> queue size. Now, a professor has told me that variance is
> usually chi-squared distributed. Is there a way in R that I
> can find the parameter that best fits a chi-square to the
> variance data? I know there's fitdistr()m but this
> function doesn't handle chi-square. I believe the mean
> estimator for the chi-square is df (degrees of freedom).
> The theoretical variance for an M/M/1 queue with
> lambda=30/33 is ~108. So, should I expect the chi-square
> with parameter 108 is the one that best fits the data?
> 
> Thanks a lot for your help.
> 
> 
> 
> 
> 
>      
> ____________________________________________________________________________________
> Yahoo! MTV Blog & Rock &gt;¡Cuéntanos tu
> historia, inspira una canción y gánate un viaje a los
> Premios MTV! Participa aquí http://mtvla.yahoo.com/
> 	[[alternative HTML version
> deleted]]______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained,
> reproducible code.



More information about the R-help mailing list