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? Thanks and regards, Dan Zhao
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
The AIC function calculate the BIC. See ?AIC On Sat, Sep 5, 2009 at 5:40 PM, <dan.zhao@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? > > Thanks and regards, > Dan Zhao > > ______________________________________________ > 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. >-- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O [[alternative HTML version deleted]]
Maybe Matching Threads
- Question about BIC of two different regression models? how should we compare two regression models?
- Why no BIC.default function?
- BIC() in "stats" {was [R-sig-ME] how to extract the BIC value}
- Calculation of BIC done by leaps-package
- Error message when calculating BIC