Description Usage Arguments Details Examples
The rZOIP function defines the random number generating function for the ZOIP distribution.
1 2 |
n |
number of observations. If length (n)> 1, the length is taken to be the number required. |
mu |
vector of location parameters. |
sigma |
vector of scale parameters. |
p0 |
parameter of proportion of zeros. |
p1 |
Parameter of proportion of ones. |
family |
choice of the parameterization or distribution, family = 'R-S' parameterization beta distribution Rigby and Stasinopoulos, 'F-C' distribution Beta parametrization Ferrari and Cribari-Neto, 'Original' Beta distribution classic parameterization, 'Simplex' simplex distribution. |
x has ZOIP distribution with shape parameters "μ", scale "σ", proportion of zeros "p0" and proportion of ones " p1 ", has density: p0 if x = 0, p1 if x = 1, (1-p0-p1) f (x; μ, σ) yes 0 <x <1.
where p0 ≥ 0 represents the probability that x = 0, p1 ≥ 0 represents the probability that x = 1, 0 ≤ p0 + p1 ≤ 1 and f (x; μ, σ) represents some of the functions of probability density for proportional data, such as the beta distribution with its different parameterizations and the simplex distribution.
When family =' R-S 'uses the beta distribution with beta parameterization Rigby and Stasinopoulos (2005) which has a beta distribution function. μ is the parameter of mean and shape, plus σ is the dispersion parameter of the distribution. family =' F-C 'distribution Beta parametrization Ferrari and Cribari-Neto (2004), where σ = φ, φ is a precision parameter. family =' Original 'beta distribution original parametrization where μ = a, a parameter of form 1; σ = b, b parameter of form 2. family =' Simplex 'simplex distribution. proposed by Barndorff-Nielsen and J<c3><b8>rgensen (1991)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | library(ZOIP)
a1<-rZOIP(n=1000, mu = 0.2, sigma = 0.5, p0 = 0.2, p1 = 0.2,family='R-S')
a2<-rZOIP(n=1000, mu = 0.2, sigma = 3, p0 = 0.2, p1 = 0.2,family='F-C')
a3<-rZOIP(n=1000, mu = 0.6, sigma = 2.4, p0 = 0.2, p1 = 0.2,family='Original')
system.time(a4<-rZOIP(n=10, mu = 0.2, sigma = 3, p0 = 0.2, p1 = 0.2,family='Simplex'))
plot(density(a1))
plot(density(a2))
plot(density(a3))
plot(density(a4))
a1<-rZOIP(n=1000, mu = 0.2, sigma = 0.5, p0 = 0.2, p1 = 0,family='R-S')
a2<-rZOIP(n=1000, mu = 0.2, sigma = 3, p0 = 0.2, p1 = 0,family='F-C')
a3<-rZOIP(n=1000, mu = 0.6, sigma = 2.4, p0 = 0.2, p1 = 0,family='Original')
system.time(a4<-rZOIP(n=10, mu = 0.2, sigma = 3, p0 = 0.2, p1 = 0,family='Simplex'))
plot(density(a1))
plot(density(a2))
plot(density(a3))
plot(density(a4))
a1<-rZOIP(n=1000, mu = 0.2, sigma = 0.5, p0 = 0, p1 = 0.2,family='R-S')
a2<-rZOIP(n=1000, mu = 0.2, sigma = 3, p0 = 0, p1 = 0.2,family='F-C')
a3<-rZOIP(n=1000, mu = 0.6, sigma = 2.4, p0 = 0, p1 = 0.2,family='Original')
system.time(a4<-rZOIP(n=10, mu = 0.2, sigma = 3, p0 = 0, p1 = 0.2,family='Simplex'))
plot(density(a1))
plot(density(a2))
plot(density(a3))
plot(density(a4))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.