Login  Register

Re: Question about ridge regression

Posted by David Marso on Oct 28, 2013; 7:16am
URL: http://spssx-discussion.165.s1.nabble.com/Question-about-ridge-regression-tp5722754p5722756.html

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

David Greenberg wrote
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.
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?"