Description Usage Arguments Value Author(s) See Also Examples
This function samples incomes from a mixture of two continuous income distributions and a point mass for zero-incomes.
1 | ysample.md(n, dist1, dist2, theta, p0, p1, p2, dist.para.table)
|
n |
number of observations. |
dist1 |
character string with the name of the first continuous distribution used. Must be listed in dist.para.table. Must be equivalent to the respective function of that distribution, e.g. norm for the normal distribution. |
dist2 |
character string with the name of the second continuous distribution used. Must be listed in dist.para.table. Must be equivalent to the respective function of that distribution, e.g. norm for the normal distribution. |
theta |
vector with the parameters of dist1 and dist2. Order must be the same as in the functions for the distributions. |
p0 |
scalar with probability mass for the point mass. |
p1 |
scalar with probability mass for dist1. |
p2 |
scalar with probability mass for dist2. |
dist.para.table |
a table of the same form as |
returns the sample of observations.
Alexander Sohn
1 2 3 4 5 6 7 8 | data(dist.para.t)
ygrid<-seq(0,1e5,by=1000)
theta<-c(5,1,10,3)
p0<-0.2
p1<-0.3
p2<-0.5
n <-10
ysample.md(n, "LOGNO", "LOGNO", theta, p0, p1, p2, dist.para.t)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.