vendredi 5 mars 2021

SAS simulate with random variable

  1. Simulate C2*2 + C4

  2. At each trial C4 is a set of random numbers between 0 and 1

  3. C4 is selected based on C1=C3

    Table1
    C1 C2
    A 1
    A 2.3
    B 5
    B 0.7 C 8 D 1.6

    Table 2 C3 C4 A random B random C random D random

  4. I tried to convert C1 C2 to arrays but am stuck at how to proceed with C1=C3 to get C4

  5. How do I create a C4 array based on C1 and C3?

  6. I can only think of hardcoding by defining each variable but hope to get advise on a better way




Aucun commentaire:

Enregistrer un commentaire