mardi 14 juillet 2020

Probability of dummy variable of randomly chosen observation is equal to 1 in R

I have a column in my dataset that contains a dummy-variable educ_pers if the educational level of the respondant is the same as his/her parents'. Each row in this dataset is one respondant.

To obtain the educational persistance, I would like to calculate the probability of a randomly chosen individual from the cohort to have educ_pers == 1. If possible, a 95% confidence interval around the probability would be ideal!

Thanks a lot in advance!




Aucun commentaire:

Enregistrer un commentaire