DeaRs, I have a doubt about: BIC (Bayesian Information Criterion) SBIC (Schwartz Bayesian Informarion Criterion) SIC (Schwartz Information Criterion) In many references these are know as the same (eg. stepAIC() function) but I just found a SAS8.2 output that show either the BIC and SIC values for a logistic regression.. simillary values but different. 1) question: What are the differences? 2) question: alwasy on BIC, from stepAIC() function help page I found a "k=log(n)" argument to add. Since that produce an error, is there a way to found the "n" dinamically? Why don't add a "k=AIC" or "k=BIC" or something simillary? Thanks in advance, Bye -- Daniele Medri
Alle 19:58, gioved?? 1 luglio 2004, Daniele Medri ha scritto:> DeaRs, > > I have a doubt about: > BIC (Bayesian Information Criterion) > SBIC (Schwartz Bayesian Informarion Criterion) > SIC (Schwartz Information Criterion) > In many references these are know as the same (eg. stepAIC() function) but > I just found a SAS8.2 output that show either the BIC and SIC values for a > logistic regression.. simillary values but different. > > 1) question: What are the differences?Kevin Kuan (University of Michigan) turn on the light! AIC = nlog(SSE/n) + 2k BIC = nlog(SSE/n) + 2(k+2)(n/s^2) - 2(ns^2/SSE)^2 SBIC = nlog(SSE/n) + klog(n) SIC = [(n-k-2)/2]log(SSE) + (k/2)log(n) + (1/2)log(det[X'X]) Dear Prof. Ripley (maintainer of stepAIC() function) is there a way to implement a generic function for these criterions or add these to stepAIC k value in a way to be "easy-daily-use"? Thank you. Bye -- Daniele Medri
> 2) question: alwasy on BIC, from stepAIC() function help page I found a > "k=log(n)" argument to add. Since that produce an error, is there a way to > found the "n" dinamically?stepAIC(mydata.logistic, trace = F, k=log(nrow(mydata))) -- Daniele Medri
>> 2) question: alwasy on BIC, from stepAIC() function help page I found a >> "k=log(n)" argument to add. Since that produce an error, is there a wayto>> found the "n" dinamically? > >stepAIC(mydata.logistic, trace = F, k=log(nrow(mydata))) > >-- >Daniele Medri(It was 3 weeks ago but I was just myself faced to the same question) Just a little warning, it is not really "dynamically" done: stepAIC takes the part of "mydata" that was used to fit "mydata.logistic" but k=log(nrow(mydata)) will still use the entire set. thus, if there were some missing data in mydata, I suggest you use something like: k=log(sum(complete.cases(mydata))) which will be smaller than k=log(nrow(mydata)). If some data are missing only for a covariate and this one is withdrawn, you will have a warning and it will stop: Error in stepAIC(mydata.logistic (etc.) number of rows in use has changed: remove missing values? Since (I presume) these criteria need to compare two models with identical dataset. In any other case, if you have NAs at the start but the number of NAs does not change in the process, you won't be warned if you use k=log(nrow(mydata)). Mayeul KAUFFMANN Univ. Pierre Mendes France Grenoble - France