-1

Here I take DemocracyIncome as an example. I need to simulate this dataset but I don't know which probability distribution of democracy and income I should choose. The dataset can be obtained from the following codes

library(pder)
data("DemocracyIncome", package = "pder")

Can anyone help me with the distribution of income and democracy? How can I simulate this democracy? I did a densityplot also and found that democracy has two to three peaks. It seems like a bimodal distribution.

w12345678
  • 63
  • 6
  • 3
    This is a question for stats.stackexchange.com. And it has already some answers: [here](https://stats.stackexchange.com/questions/132652/how-to-determine-which-distribution-fits-my-data-best) – Edo Sep 02 '20 at 11:08

1 Answers1

0

I had a similar question some days ago and got helpful insights in the following post: How to identify the distribution of the given data using r

Adapted to your dataset

library(pder)
data("DemocracyIncome", package = "pder")

demo <- na.omit(DemocracyIncome)


 library(fitdistrplus)
 descdist(demo$income, discrete = FALSE)


 normal_dist <- fitdist(demo$income, "norm")

 plot(normal_dist)

The first plot help you to identify distribution, second plot(s) are to check normal distribution! Hope this helps.

dholzer
  • 26
  • 8