BookmarkSubscribeRSS Feed
goliPSU
Calcite | Level 5

Hello.

round(Z[,+]+ y - t(Z[+,]+v+m),.1)

I am not familiar with SAS, what [,+], and [+,] will do on Z matrix and what is their difference.

Thank you

2 REPLIES 2
nicolas_
Calcite | Level 5

Those are subscript reduction operators. They collapse the dimensionality of your matrix and the + tells SAS to do this by summing.

If you have a matrix Z = {1 2 3, 4 5 6, 7 8 9} then Z[+,] = {(1+4+8) (2+5+8) (3+6+9)} = {12 15 18}, which is a rowvector. Z[,+] = {1+2+3,4+5+6,7+8+9} = {6,15,24}, which is a columnvector.

See http://support.sas.com/documentation/cdl/en/imlug/59656/HTML/default/viewer.htm#workmatrix_sect14.ht... for more info.

goliPSU
Calcite | Level 5

Thank you very much.

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

From The DO Loop
Want more? Visit our blog for more articles like these.
Discussion stats
  • 2 replies
  • 1306 views
  • 3 likes
  • 2 in conversation