AIC in SPSS

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

AIC in SPSS

Nabaneeta Saha
Hi all,

I am running a Univariate GLM. My single dependable variable is continuous
and my independent variables are categorical. I have 4 independent
variables. I want to compare models of which combination of independent
variable best explain the response variable. Could anyone tell me how
could I get the AIC or BIC values of the models in the output in SPSS.

Thank you

Nabaneeta

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: AIC in SPSS

Bruce Weaver
Administrator
Nabaneeta Saha wrote
Hi all,

I am running a Univariate GLM. My single dependable variable is continuous
and my independent variables are categorical. I have 4 independent
variables. I want to compare models of which combination of independent
variable best explain the response variable. Could anyone tell me how
could I get the AIC or BIC values of the models in the output in SPSS.

Thank you

Nabaneeta
You'll have to "roll your own", so to speak.  I.e., compute it yourself.  For AIC, you need N, k (the number of parameters fit by the model, including the intercept), and RSS (the residual sum of squares).  For BIC, things are a bit more complicated; so unless you really want it for some reason, I'd stick with AIC (or the second order corrected version for smaller samples).

   http://en.wikipedia.org/wiki/Akaike_information_criterion
   http://en.wikipedia.org/wiki/Bayesian_information_criterion


This reminds me of something I've been meaning to suggest to the good folks at SPSS:  I think that AIC (and corrected AIC) would be very nice additions to the CURVEFIT procedure.  

--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.
Reply | Threaded
Open this post in threaded view
|

Re: AIC in SPSS

Bruce Weaver
Administrator
Bruce Weaver wrote
Nabaneeta Saha wrote
Hi all,

I am running a Univariate GLM. My single dependable variable is continuous
and my independent variables are categorical. I have 4 independent
variables. I want to compare models of which combination of independent
variable best explain the response variable. Could anyone tell me how
could I get the AIC or BIC values of the models in the output in SPSS.

Thank you

Nabaneeta
You'll have to "roll your own", so to speak.  I.e., compute it yourself.  For AIC, you need N, k (the number of parameters fit by the model, including the intercept), and RSS (the residual sum of squares).  For BIC, things are a bit more complicated; so unless you really want it for some reason, I'd stick with AIC (or the second order corrected version for smaller samples).

   http://en.wikipedia.org/wiki/Akaike_information_criterion
   http://en.wikipedia.org/wiki/Bayesian_information_criterion


This reminds me of something I've been meaning to suggest to the good folks at SPSS:  I think that AIC (and corrected AIC) would be very nice additions to the CURVEFIT procedure.  
On the way home, I had another idea.  If you use the MIXED procedure to run your ANOVA, it will spit out AIC, BIC, and a few other measures of fit.  Here's an example:

   http://www.angelfire.com/wv/bwhomedir/spss/mixed001.txt

HTH.

p.s. - AIC and related measures would STILL be nice additions to CURVEFIT!  
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.
Reply | Threaded
Open this post in threaded view
|

Re: AIC in SPSS

Ryan Black
In reply to this post by Nabaneeta Saha
Nabaneeta,
 
Within the ordinary least squares regression framework,
 
AIC = n*log(SSE/n)+2(k+1)
 
and
 
BIC = n*log(SSE/n) + (k+1) * log(n)
 
where
 
n = sample size
SSE= sum of squared errors
k = number of predictors
 
Ryan

On Tue, Oct 12, 2010 at 4:37 PM, Nabaneeta Saha <[hidden email]> wrote:
Hi all,

I am running a Univariate GLM. My single dependable variable is continuous
and my independent variables are categorical. I have 4 independent
variables. I want to compare models of which combination of independent
variable best explain the response variable. Could anyone tell me how
could I get the AIC or BIC values of the models in the output in SPSS.

Thank you

Nabaneeta

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

Reply | Threaded
Open this post in threaded view
|

Re: AIC in SPSS

Bruce Weaver
Administrator
In reply to this post by Bruce Weaver
Bruce Weaver wrote
Bruce Weaver wrote
Nabaneeta Saha wrote
Hi all,

I am running a Univariate GLM. My single dependable variable is continuous
and my independent variables are categorical. I have 4 independent
variables. I want to compare models of which combination of independent
variable best explain the response variable. Could anyone tell me how
could I get the AIC or BIC values of the models in the output in SPSS.

Thank you

Nabaneeta
You'll have to "roll your own", so to speak.  I.e., compute it yourself.  For AIC, you need N, k (the number of parameters fit by the model, including the intercept), and RSS (the residual sum of squares).  For BIC, things are a bit more complicated; so unless you really want it for some reason, I'd stick with AIC (or the second order corrected version for smaller samples).

   http://en.wikipedia.org/wiki/Akaike_information_criterion
   http://en.wikipedia.org/wiki/Bayesian_information_criterion


This reminds me of something I've been meaning to suggest to the good folks at SPSS:  I think that AIC (and corrected AIC) would be very nice additions to the CURVEFIT procedure.  
On the way home, I had another idea.  If you use the MIXED procedure to run your ANOVA, it will spit out AIC, BIC, and a few other measures of fit.  Here's an example:

   http://www.angelfire.com/wv/bwhomedir/spss/mixed001.txt

HTH.

p.s. - AIC and related measures would STILL be nice additions to CURVEFIT!  
I didn't read the description of your ANOVA model carefully enough, and had in mind that it was a one-way ANOVA.  But now I see you have 4 explanatory variables.  You can still use MIXED.  Here's an example of a two-factor fully factorial model run via MIXED.

   http://www.angelfire.com/wv/bwhomedir/spss/mixed002.txt

For a 4-factor model, with explanatory variables A-D, it would be something like the following, depending on whether you want the full factorial model or not:

MIXED
  Y  BY A B C D
  /FIXED = A B C D
               A*B A*C A*D B*C B*D C*D
               A*B*C A*B*D A*C*D B*C*D
               A*B*C*D | SSTYPE(3)
  /EMMEANS = TABLES(A)
  /EMMEANS = TABLES(B)
  /EMMEANS = TABLES(C)
   etc...
.
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.
Reply | Threaded
Open this post in threaded view
|

Re: AIC in SPSS

Ryan Black
In reply to this post by Bruce Weaver
It is worth pointing out that the MIXED procedure uses maximum likelihood estimation instead of ordinary least squares estimation. That is, the values of the parameters are estimated by maximizing the likelihood function, not by minimizing the squared difference between the observed and predicted values. The AIC and BIC estimated via the MIXED procedure are partly based on the [log] likelihood function.
Ryan
 
On Tue, Oct 12, 2010 at 6:31 PM, Bruce Weaver <[hidden email]> wrote:
Bruce Weaver wrote:
>
>
> Nabaneeta Saha wrote:
>>
>> Hi all,
>>
>> I am running a Univariate GLM. My single dependable variable is
>> continuous
>> and my independent variables are categorical. I have 4 independent
>> variables. I want to compare models of which combination of independent
>> variable best explain the response variable. Could anyone tell me how
>> could I get the AIC or BIC values of the models in the output in SPSS.
>>
>> Thank you
>>
>> Nabaneeta
>>
>>
>
> You'll have to "roll your own", so to speak.  I.e., compute it yourself.
> For AIC, you need N, k (the number of parameters fit by the model,
> including the intercept), and RSS (the residual sum of squares).  For BIC,
> things are a bit more complicated; so unless you really want it for some
> reason, I'd stick with AIC (or the second order corrected version for
> smaller samples).
>
>    http://en.wikipedia.org/wiki/Akaike_information_criterion
>    http://en.wikipedia.org/wiki/Bayesian_information_criterion
>
>
> This reminds me of something I've been meaning to suggest to the good
> folks at SPSS:  I think that AIC (and corrected AIC) would be very nice
> additions to the CURVEFIT procedure.
>
>
>

On the way home, I had another idea.  If you use the MIXED procedure to run
your ANOVA, it will spit out AIC, BIC, and a few other measures of fit.
Here's an example:

  http://www.angelfire.com/wv/bwhomedir/spss/mixed001.txt

HTH.

p.s. - AIC and related measures would STILL be nice additions to CURVEFIT!

-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/AIC-in-SPSS-tp3209580p3209741.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

Reply | Threaded
Open this post in threaded view
|

Re: AIC in SPSS

Alex Reutter
In reply to this post by Nabaneeta Saha

Also note that the default estimation method in MIXED is REML (restricted maximum likelihood), which for models with just a single residual error parameter produces results that are identical to the least-squares results from GLM or UNIANOVA.

Alex

From: R B <[hidden email]>
To: [hidden email]
Date: 10/12/2010 08:22 PM
Subject: Re: AIC in SPSS
Sent by: "SPSSX(r) Discussion" <[hidden email]>





It is worth pointing out that the MIXED procedure uses maximum likelihood estimation instead of ordinary least squares estimation. That is, the values of the parameters are estimated by maximizing the likelihood function, not by minimizing the squared difference between the observed and predicted values. The AIC and BIC estimated via the MIXED procedure are partly based on the [log] likelihood function.
Ryan
 
On Tue, Oct 12, 2010 at 6:31 PM, Bruce Weaver <bruce.weaver@...> wrote:
Bruce Weaver wrote:
>
>
> Nabaneeta Saha wrote:
>>
>> Hi all,
>>
>> I am running a Univariate GLM. My single dependable variable is
>> continuous
>> and my independent variables are categorical. I have 4 independent
>> variables. I want to compare models of which combination of independent
>> variable best explain the response variable. Could anyone tell me how
>> could I get the AIC or BIC values of the models in the output in SPSS.
>>
>> Thank you
>>
>> Nabaneeta
>>
>>
>
> You'll have to "roll your own", so to speak.  I.e., compute it yourself.
> For AIC, you need N, k (the number of parameters fit by the model,
> including the intercept), and RSS (the residual sum of squares).  For BIC,
> things are a bit more complicated; so unless you really want it for some
> reason, I'd stick with AIC (or the second order corrected version for
> smaller samples).
>
>    
http://en.wikipedia.org/wiki/Akaike_information_criterion
>    
http://en.wikipedia.org/wiki/Bayesian_information_criterion
>
>
> This reminds me of something I've been meaning to suggest to the good
> folks at SPSS:  I think that AIC (and corrected AIC) would be very nice
> additions to the CURVEFIT procedure.
>
>
>

On the way home, I had another idea.  If you use the MIXED procedure to run
your ANOVA, it will spit out AIC, BIC, and a few other measures of fit.
Here's an example:

 
http://www.angelfire.com/wv/bwhomedir/spss/mixed001.txt

HTH.

p.s. - AIC and related measures would STILL be nice additions to CURVEFIT!