The matrix r is (2*t-1)*(2*t-1) but is it empty..may you help me?
Besides, I need to start the do from a negative number is this o.k.??
This is the program:
do i= (1-t) to (t-1);
do j= (1-t) to (t-1);
if j<0 then z1=az1;
if j=0 then z1=bz1;
if j>0 then z1=cz1;
Thanks in advance.
Waiting for your reply.
If you declare a 29x29 matrix then you can only reference individual elements within it by using the integers 1 to 29 as row or column subscript indices. You were trying to use -14 to +14 as the indices, so my suggestion was to shift it back to the correct range by adding 15.
Since we don't know what numbers are correct, you need to tell us what you expect or give an example for t=3.
The correctness of the program depends on z2 and z1. You can check their correctness with the following:
1) Outside the loop, allocate
2) Within the loop, define
Lower[i+t,j+t] = z1;
Upper[i+t,j+t] = z2;
3) Print Lower and Upper after the loop.
BTW, since the normal CDF is effectively zero when z<-6 and is 1 when z>6, you can probably get by with a smaller value of t. In any case, switch from PROBNORM(z) to CDF("Normal",z), as suggested at the end of this article: Six reasons you should stop using the RANUNI function to generate random numbers - The DO Loop
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.