SAS/IML Software and Matrix Computations

Statistical programming, matrix languages, and more
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
jennie
Calcite | Level 5

I am trying to solve the following...

W = pX

X is an i x 1 vector of known values (i is the number of observations in my sample)

p is a constant and is negative (it is unknown).

W is an i x1 vector of unknown values.

The sum of the values in W needs to equal zero. (w1 + w2 + w3 + ...+ wi = 0)

I am trying to solve for W.

I am not sure how to set up this problem so that I can solve for W.

Is this something that I can do using proc IML?

If so, can you please help show me how I can set it up.... I have been struggling with this all day and any help or advice is appreciated!

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

If sum(X)=0, then you can choose any value for p.  If not, then there is no solution when p is nonzero.

View solution in original post

2 REPLIES 2
Rick_SAS
SAS Super FREQ

If sum(X)=0, then you can choose any value for p.  If not, then there is no solution when p is nonzero.

jennie
Calcite | Level 5

Thanks Rick,

You are correct.

I am a bit embarrassed!

I got so stuck on looking at how to code the conditions that I made it more complicated than it truly was.

The sum of X is such that it equals zero...

Thank you for help,

Jennifer

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
  • 1301 views
  • 0 likes
  • 2 in conversation