|
I just have two questions regarding Adjusted R^2 in regression output:
1) I have just come across a case where the Adjusted R^2 is negative. How is this possible? How am I supposed to interpret a negative Adjusted R^2. A negative percentage of the variance in the dependent variable is explained by the independent variable? The example where I came up with this negative amount was in a simple linear regression model. 2) I always thought the whole reason behind Adjusted R^2 was that as you add more independent variables to your regression model, your R^2 increases just because there is another variable in your model ( even if it isn't significant)and the Adjusted R^2 adjusts for this. So I would have thought if I am just running a simple linear regression model with only one independent variable, the Adjusted R^2 adn the R^2 would be the same. But this isn't so. Can anyone explain? Thanks so much! |
|
SPSS 16 introduced Extension commands. These are user-defined syntax that is implemented in Python or R programs. That allows you to use the programs without knowing Python or R. Once installed, they are automatically available in SPSS.
Here is a list of the extension commands currently available for download from SPSS Developer Central (www.spss.com/devcentral). These all require at least SPSS 16.0.2 and the Python Programmability Plug-In. For most of these, executing command-name /HELP. provides a full description of the syntax. These are generally structured so that the underlying implementation can be called directly as a Python function if you want to use them in a BEGIN PROGRAM block, and some have extra functionality available when used this way. HIDECOLS and SCRIPTEX are brand new. CASECTRL case-control-style matching CODEBOOK produce a codebook for a data file COMPDS compare data and/or variable dictionaries of two datasets. GATHERMD build a dataset of variable information from multiple datasets HIDECOLS hide selected columns in pivot tables PLS compute partial least squares regression PROPOR produce confidence intervals for proportions SCRIPTEX run a Python script synchronously and pass it arguments TEXT produce a text block in the output We hope you will find these useful. Regards, Jon Peck SPSS ===================== 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 |
|
In reply to this post by jimjohn
On Thu, 26 Jun 2008 11:02:46 -0700, jimjohn <[hidden email]> wrote:
>I just have two questions regarding Adjusted R^2 in regression output: > >1) I have just come across a case where the Adjusted R^2 is negative. How is >this possible? How am I supposed to interpret a negative Adjusted R^2. A >negative percentage of the variance in the dependent variable is explained >by the independent variable? The example where I came up with this negative >amount was in a simple linear regression model. > Someone else here might explain it better but a negative value is possible. The R^2 value is calculated from the difference between 1.0 and the ratio of the sum of squares of your regression line and the sum of squares of the average line. Usually your regression line is a better fit than the average and the ratio is a value <1.0. However, it is possible that your regression model is a worse fit than a horizontal average line. resulting in higher sum of squares for your model and thus a ratio >1.0. Since the R^2 is the difference between 1.0 and the ratio, you can see how the second scenario can result in a negative value. If you do have a negative R^2, check to see if you have the appropriate model. Maybe a different model would be a better fit. >2) I always thought the whole reason behind Adjusted R^2 was that as you add >more independent variables to your regression model, your R^2 increases just >because there is another variable in your model ( even if it isn't >significant)and the Adjusted R^2 adjusts for this. So I would have thought >if I am just running a simple linear regression model with only one >independent variable, the Adjusted R^2 adn the R^2 would be the same. But >this isn't so. Can anyone explain? > Again, this is possible due to the formula used to calculate the adjusted R^2. It is a function of the original R^2 as well as the sample size and the number of regressors. In the scenario where you have only one regressor your adjusted R^2 will be further away from your unadjusted value the lower the sample size and the lower the unadjusted R^2. Since the adjusted value corrects for multiple regressors, you should report your unadjusted R^2 for a model with only one independent variable. HTH. - Steve ===================== 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 |
|
In reply to this post by Peck, Jon
At 02:32 PM 6/26/2008, Peck, Jon wrote:
>SPSS 16 introduced Extension commands. These are user-defined >syntax that is implemented in Python or R programs. That allows you >to use the programs without knowing Python or R. Once installed, >they are automatically available in SPSS. Does invoking an Extension command effectively imply an EXECUTE -- that is, all pending transformations are executed and the new active dataset created before the extension code begins? Or, can you write one to act like a procedure does: have an internal loop that accepts one transformed case at a time, as the file is read and transformed? Or, even, act as a transformation command, invoked once for each case during the transformation pass, able to read and write the data for that case (even if, likely, not create new variables)? I know that Programmability code can now add to data and modify it, but I understand that requires special access to the data as a Cursor object. ===================== 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 |
|
In reply to this post by jimjohn
Adjusted R squared is 1 - (1-RSQ)(n-1)/(n-p-1)
SO as p approaches n, what happens. First, RSQ goes up because of overfit. So 1 - RSQ will approach 0. However, n-p-1 gets small faster relative to n-1. So (n-1)/(n-p-1) can be > 1. So it os possible for Adjuste RSQ < 0. It likely means that RSQ = 0 or thereabouts in the population. Paul R. Swank, Ph.D. Professor and Director of Research Children's Learning Institute University of Texas Health Science Center - Houston -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of jimjohn Sent: Thursday, June 26, 2008 1:03 PM To: [hidden email] Subject: Adjusted R^2 I just have two questions regarding Adjusted R^2 in regression output: 1) I have just come across a case where the Adjusted R^2 is negative. How is this possible? How am I supposed to interpret a negative Adjusted R^2. A negative percentage of the variance in the dependent variable is explained by the independent variable? The example where I came up with this negative amount was in a simple linear regression model. 2) I always thought the whole reason behind Adjusted R^2 was that as you add more independent variables to your regression model, your R^2 increases just because there is another variable in your model ( even if it isn't significant)and the Adjusted R^2 adjusts for this. So I would have thought if I am just running a simple linear regression model with only one independent variable, the Adjusted R^2 adn the R^2 would be the same. But this isn't so. Can anyone explain? Thanks so much! -- View this message in context: http://www.nabble.com/Adjusted-R%5E2-tp18139825p18139825.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 ===================== 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 |
|
In reply to this post by Richard Ristow
-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Richard Ristow Sent: Thursday, June 26, 2008 1:22 PM To: [hidden email] Subject: Re: [SPSSX-L] SPSS Extension Commands At 02:32 PM 6/26/2008, Peck, Jon wrote: >SPSS 16 introduced Extension commands. These are user-defined >syntax that is implemented in Python or R programs. That allows you >to use the programs without knowing Python or R. Once installed, >they are automatically available in SPSS. Does invoking an Extension command effectively imply an EXECUTE -- that is, all pending transformations are executed and the new active dataset created before the extension code begins? [>>>Peck, Jon] No. Any program you can write can be an extension command. Using the Dataset class requires that any pending transformations be executed (think of the Data Editor behavior), but using the Cursor class is equivalent to what procedures do: you join the data pipeline right behind any pending transformations. The Dataset class is very flexible and need not pass all the cases or even access them in order, so it can't piggyback on transformations. Or, can you write one to act like a procedure does: have an internal loop that accepts one transformed case at a time, as the file is read and transformed? [>>>Peck, Jon] Yes, the Cursor class works that way. Or, even, act as a transformation command, invoked once for each case during the transformation pass, able to read and write the data for that case (even if, likely, not create new variables)? [>>>Peck, Jon] You can create new variables at the start of a data pass with the Cursor class. With the Dataset class you can create them at any point - and they could even be going into a different, non-active dataset. The Cursor class always uses the active dataset. The COMPDS extension uses two Dataset objects to move through and compare the two datasets in parallel. The Cursor class could not do that (which is why the dataset compare code requires 16 even when not used as an extension.) I know that Programmability code can now add to data and modify it, but I understand that requires special access to the data as a Cursor object. [>>>Peck, Jon] Cursor class or Dataset class. But all this applies to programs generally. Extensions are a syntax wrapper on top of Python or R programs. -Jon Peck ===================== 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 ===================== 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 |
| Free forum by Nabble | Edit this page |
