[R] About BIC
Steve Lianoglou
mailinglist.honeypot at gmail.com
Sun Sep 6 16:10:07 CEST 2009
Hi Dan,
On Sat, Sep 5, 2009 at 4:40 PM, <dan.zhao at uni-ulm.de> wrote:
> Hello,
>
> I am working on getting optimal lags by using BIC, But I don't know how to
> calculate BIC. Is there any code or useful function for it?
The second formula listed on the wikipedia page for BIC seems pretty
straightforward to calculate:
http://en.wikipedia.org/wiki/Bayesian_information_criterion
BIC = n * ln(RSS/n) + k * ln(n)
n = number of datapoints in your data
RSS = residual sum of squares
k = number of free params in your model
Otherwise, there is a BIC function in the nlme package and maybe
others since I just ran ??bic to find it.
Hope that helps,
-steve
--
Steve Lianoglou
Graduate Student: Computational Systems Biology
| Memorial Sloan-Kettering Cancer Center
| Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact
More information about the R-help
mailing list