xieliaing / SAS

This is the collection of my own SAS utility macros/ sample code over my past 10 years of SAS programming and analysis experience from 2004 to 2014.
GNU General Public License v2.0
304 stars 147 forks source link

%Boost issues matrix error #15

Closed dtdibaba closed 7 months ago

dtdibaba commented 1 year ago

Hi Xieliang: The %boost procedure issues the following error Why doe the _TEM1002 have only 1 column instead of 3? x_curr[rank(x[,j]),]=b; free b; The error is generated by this line:

  %boost(data3, 10, boosted, boostwts, 10, 4);

ERROR: (execution) Invalid subscript or subscript out of range.

operation : [ at line 428 column 1 operands : x_curr, _TEM1002, , b x_curr 200 rows 3 cols (numeric) _TEM1002 200 rows 1 col (numeric) b 200 rows 3 cols (numeric)

statement : ASSIGN at line 428 column 1 traceback : module REGSPLIT_IML at line 428 column 1

xieliaing commented 1 year ago

Thanks for your interest in these macros. Unfortunately, I don't have access to SAS, SAS/IML anymore, nor do I work on SAS-related projects. These code pieces are provided as they are.

dtdibaba commented 1 year ago

Thanks for your reply. The code does not work. I tried to work around the first error but then the EXP raises an overflow or large number error. By the way I live in the same area. We should fix the macro so that it works. LogitBoost is in R and Python but not in SAS.

xieliaing commented 1 year ago

maybe you can try the 'boost.sas' macro which uses data steps rather than IML. To be frankly, all macros were tested as I used them in my previous work. But I don't have access to SAS now so I can't test what's changed.

dtdibaba commented 1 year ago

I will check boost.sas. Thank you!