mardi 20 octobre 2020

How to create matrix in STATA

I want to make a sample of two variables, according to a specific probability distribution. I thought of making a matrix that expresses the probability distribution but my code results in "p is not defined". // p = matrix(c(0.04,0.1,0,0.06,0.05,0.3,0,0.05,0.14,0.1,0.06,0.1), nrow=3, ncol=4, byrow = TRUE) sample_100 = rDiscrete(n=50000,pf=p) // How can I fix this?




Aucun commentaire:

Enregistrer un commentaire