Anyone who will inform me how to generate Skew Symmetric Matrices in SAS/iml, please? Similarly a SAS/IML code to create a Full rank matrix, please? I thank you.
Just as Rick said, show what you have tried ,that is benefit to you and us .
Check if the following code is what you need .
proc iml;
A=j(8,4);
call randseed(12345678);
call randgen(A,'normal');
cov=cov(A);
idx=loc(row(cov)<col(cov));
cov[idx]=-cov[idx];
skew_symmetric_matrix=cov;
matrix_rank=round(trace(ginv(skew_symmetric_matrix)*skew_symmetric_matrix));
print skew_symmetric_matrix ,matrix_rank;
quit;
Although homework questions are welcome, when you ask for help you need to show what you've tried so far. Explain what you know and what you are confused about. Post some PROC IML code that indicates how you are attempting to solve the problem.
Here's a hint: A square matrix is skew-symmetric if A` = -A. Therefore you want to construct a matrix such that A[i,j] = -A[j,i] for all i,j.
Just as Rick said, show what you have tried ,that is benefit to you and us .
Check if the following code is what you need .
proc iml;
A=j(8,4);
call randseed(12345678);
call randgen(A,'normal');
cov=cov(A);
idx=loc(row(cov)<col(cov));
cov[idx]=-cov[idx];
skew_symmetric_matrix=cov;
matrix_rank=round(trace(ginv(skew_symmetric_matrix)*skew_symmetric_matrix));
print skew_symmetric_matrix ,matrix_rank;
quit;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.
Find more tutorials on the SAS Users YouTube channel.