Hi Dan,

On Sat, Sep 5, 2009 at 4:40 PM, <dan.z...@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

______________________________________________
R-help@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.

Reply via email to