jeudi 30 mars 2023

SAS Create a noise with random realization of a negative binomial distribution in a dataset

I’m working in SAS with a dataset such this:

enter image description here

I would like to introduce a variable, named “noised_y”, such this:

enter image description here

Every value of "noised_y" must be obtained, as a random realization of a negative binomial distribution of mean ugual to the correspondent value of y.

May you suggest a Sas procedure to create a random noise as this?

Thank you very much

G




Aucun commentaire:

Enregistrer un commentaire