About a dozen years ago or more I used the syntax below to enter a correlation matrix into SPSS, and then estimate a ridge regression on it. Now I am using version 21, and it doesn't work. Could someone telll me how to modify the syntax so that it will run? Thank you, David Greenberg, Sociology Department, New York University
matrix data variables=ftp unemp lic hgr clear hom /contents = n_scalar corr/format=upper. begin data 13 1 .293 .569 .702 -.974 .964 1 -.167 -.033 -.306 .210 1 .904 -.555 .726 1 -.683 .816 1 -.968 1 end data. begin matrix 'include 'P:\spsswin\ridgereg.sps'. ridgereg dep=hom/enter=ftp unemp lic hgr clear /start=0/stop=1/inc=.05. end matrix. |
Administrator
|
David,
You are proceeding under the false assumption that RidgeReg supports MATRIX input. Note towards the beginning of the macro correlations variables=!dep !enter /missing=listwise/matrix out(*). set errors on results listing . YOU could possibly modify the macro to bypass the correlations command and read the current active file. What you have here would never have worked. Where does this begin matrix .. end matrix come from? You can't just make up commands and expect them to work (there is no BEGIN MATRIX in SPSS). David
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
In reply to this post by David Greenberg
Note that ridge regression is available
as a built-in procedure in the Categories option (along with lasso and
elastic net).
Jon Peck (no "h") aka Kim Senior Software Engineer, IBM [hidden email] phone: 720-342-5621 From: David Greenberg <[hidden email]> To: [hidden email], Date: 10/27/2013 09:32 PM Subject: [SPSSX-L] Question about ridge regression Sent by: "SPSSX(r) Discussion" <[hidden email]> About a dozen years ago or more I used the syntax below to enter a correlation matrix into SPSS, and then estimate a ridge regression on it. Now I am using version 21, and it doesn't work. Could someone telll me how to modify the syntax so that it will run? Thank you, David Greenberg, Sociology Department, New York University matrix data variables=ftp unemp lic hgr clear hom /contents = n_scalar corr/format=upper. begin data 13 1 .293 .569 .702 -.974 .964 1 -.167 -.033 -.306 .210 1 .904 -.555 .726 1 -.683 .816 1 -.968 1 end data. begin matrix 'include 'P:\spsswin\ridgereg.sps'. ridgereg dep=hom/enter=ftp unemp lic hgr clear /start=0/stop=1/inc=.05. end matrix. |
Administrator
|
And for those who lack the $ for categories?
I suspect it would take you (Jon) about 5-10 minutes to add support for MATRIX input, multiple data sets (rather than saving the data to a temp file), and make the output prettier. AFAICT: I am the very last person to have touched that code probably back in 1996 (I was still in teksport) ? ---
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
In reply to this post by Jon K Peck
Hi Jon, It is good to know that SPSS provides the ridge regression option along with LASSO and ELASTIC NET. I did not know this before reading this message. So, it
is the menu under Analyze/Regression/Optimal Scaling (CATREG)? Thanks a lot!! Hongwei Yang, University of Kentucky From: SPSSX(r) Discussion [mailto:[hidden email]]
On Behalf Of Jon K Peck Note that ridge regression is available as a built-in procedure in the Categories option (along with lasso and elastic net).
|
Yes, see the Regularization subdialog.
Jon Peck (no "h") aka Kim Senior Software Engineer, IBM [hidden email] phone: 720-342-5621 From: "Yang, Hongwei" <[hidden email]> To: Jon K Peck/Chicago/IBM@IBMUS, "[hidden email]" <[hidden email]>, Date: 10/28/2013 10:51 AM Subject: RE: Question about ridge regression Hi Jon, It is good to know that SPSS provides the ridge regression option along with LASSO and ELASTIC NET. I did not know this before reading this message. So, it is the menu under Analyze/Regression/Optimal Scaling (CATREG)? Thanks a lot!! Hongwei Yang, University of Kentucky From: SPSSX(r) Discussion [[hidden email]] On Behalf Of Jon K Peck Sent: Monday, October 28, 2013 8:18 AM To: [hidden email] Subject: Re: Question about ridge regression Note that ridge regression is available as a built-in procedure in the Categories option (along with lasso and elastic net). Jon Peck (no "h") aka Kim Senior Software Engineer, IBM peck@... phone: 720-342-5621 From: David Greenberg <dg4@...> To: [hidden email], Date: 10/27/2013 09:32 PM Subject: [SPSSX-L] Question about ridge regression Sent by: "SPSSX(r) Discussion" <[hidden email]> About a dozen years ago or more I used the syntax below to enter a correlation matrix into SPSS, and then estimate a ridge regression on it. Now I am using version 21, and it doesn't work. Could someone telll me how to modify the syntax so that it will run? Thank you, David Greenberg, Sociology Department, New York University matrix data variables=ftp unemp lic hgr clear hom /contents = n_scalar corr/format=upper. begin data 13 1 .293 .569 .702 -.974 .964 1 -.167 -.033 -.306 .210 1 .904 -.555 .726 1 -.683 .816 1 -.968 1 end data. begin matrix 'include 'P:\spsswin\ridgereg.sps'. ridgereg dep=hom/enter=ftp unemp lic hgr clear /start=0/stop=1/inc=.05. end matrix. |
In reply to this post by Jon K Peck
CONTENTS DELETED
The author has deleted this message.
|
RR is available via the OPTREG command. There is also a RR macro around somewhere. On Wed, Jan 22, 2020 at 7:10 PM parvin <[hidden email]> wrote: Hello, What is the syntax of ridge regression in spss? |
Free forum by Nabble | Edit this page |