Title: | The q-Gaussian Distribution |
---|---|
Description: | Density, distribution function, quantile function and random generation for the q-gaussian distribution with parameters mu and sig. |
Authors: | Emerson Luis de Santa Helena <[email protected]> Wagner Santos de Lima <[email protected]> |
Maintainer: | Wagner Santos de Lima <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.1.8 |
Built: | 2024-11-06 03:40:39 UTC |
Source: | https://github.com/cran/qGaussian |
Given a random number generator of q-Gaussian random variables for a range of q values, -8 < q < 3, based on deterministic map dynamics. To yield a 'q' value, a characteristic entropic index of the q-gaussian distributions.
Chaotic(n,q,v0,z0)
Chaotic(n,q,v0,z0)
n |
number of observations. If length(n) > 1, the length is taken to be the number required. |
q |
entropic index. |
v0 |
a random seed. |
z0 |
a random seed. |
a number q < 3, and the standard error.
Emerson Luis de Santa Helena , Wagner Santos de Lima
Umeno, K., Sato, A., IEEE Transactions on Information Theory (Volume:59,Issue:5,May 2013).Chaotic Method for Generating q-Gaussian Random Variables.
Distributions for other standard distributions, including dt and dcauchy.
Distributions
t=Chaotic(100000,0,.1,.1) hist(t,breaks=100)
t=Chaotic(100000,0,.1,.1) hist(t,breaks=100)
Density, distribution function, quantile function and random generation for the q-gaussian distribution with parameters mu and sig.
cqgauss(p, q = 0, mu = 0, sig = 1, lower.tail = TRUE)
cqgauss(p, q = 0, mu = 0, sig = 1, lower.tail = TRUE)
p |
vector of probabilities. |
q |
entropic index. |
mu |
a value for q-mean. |
sig |
a value for q-variance. |
lower.tail |
logical; if TRUE (default), probabilities are P[X <= x] otherwise, P[X > x]. |
If q , mu and sig values are not specified, they assume the default values of 0, 0 and 1, respectively. Defining Z=(q-1)/(3-q), the q-gaussian distribution has density wrinten as
p(x) = (sig*Beta(alpha/2,1/2))^-1*(1+Z(x-mu)^2/sig^2)^-(1+1/Z)/2
where alpha = 1 - 1/Z when q < 1 and 1/Z when 1 < q < 3.
dqgauss gives the density, pqgauss gives the distribution function, cqgauss gives the quantile function, and rqgauss generates random deviates.
Emerson Luis de Santa Helena , Wagner Santos de Lima
Thistleton, W.,Marsh, J. A.,Nelson, K.,Tsallis, C., (2007) IEEE Transactions on Information Theory, 53(12):4805
Tsallis, C., (2009) Introduction to Nonextensive Statistical Mechanics. Springer.
de Santa Helena, E. L., Nascimento, C. M., and Gerhardt, G. J., (2015) Alternative way to charecterize a q-gaussian distribution by a robust heavy tail measurement. Physica A, (435):44-50.
Manuscript submitted for publication (2016) qGaussian: Tools to Explore Applications of Tsallis Statistics
Distributions for other standard distributions, including dt and dcauchy.
Distributions
qv <- c(2.8,2.5,2,1.01,0,-5); nn <- 700 xrg <- sqrt((3-qv[6])/(1-qv[6])) xr <- seq(-xrg,xrg,by=2*xrg/nn) y0 <- dqgauss(xr,qv[6]) plot(xr,y0,ty='l',xlim=range(-4.5,4.5),ylab='p(x)',xlab='x') for (i in 1:5){ if (qv[i]< 1) xrg <- sqrt((3-qv[i])/(1-qv[i])) else xrg <- 4.5 vby <- 2*xrg/nn xr <- seq(-xrg,xrg,by=2*xrg/nn) y0 <- dqgauss(xr,qv[i]) points (xr,y0,ty='l',col=(i+1)) } legend(2, 0.4, legend =c(expression(paste(q==-5)),expression(paste(q==0)), expression(paste(q==1.01)),expression(paste(q==2)),expression(paste(q==2.5)), expression(paste(q==2.8))),col = c(1,6,5,4,3,2), lty = c(1,1,1,1,1,1)) ###### qv <- 0 rr <- rqgauss(2^16,qv) nn <- 70 xrg <- sqrt((3-qv)/(1-qv)) vby <- 2*xrg/(nn) xr <- seq(-xrg,xrg,by=vby) hist (rr,breaks=xr,freq=FALSE,xlab="x",main='') y <- dqgauss(xr) lines(xr,y/sum(y*vby),cex=.5,col=2,lty=4)
qv <- c(2.8,2.5,2,1.01,0,-5); nn <- 700 xrg <- sqrt((3-qv[6])/(1-qv[6])) xr <- seq(-xrg,xrg,by=2*xrg/nn) y0 <- dqgauss(xr,qv[6]) plot(xr,y0,ty='l',xlim=range(-4.5,4.5),ylab='p(x)',xlab='x') for (i in 1:5){ if (qv[i]< 1) xrg <- sqrt((3-qv[i])/(1-qv[i])) else xrg <- 4.5 vby <- 2*xrg/nn xr <- seq(-xrg,xrg,by=2*xrg/nn) y0 <- dqgauss(xr,qv[i]) points (xr,y0,ty='l',col=(i+1)) } legend(2, 0.4, legend =c(expression(paste(q==-5)),expression(paste(q==0)), expression(paste(q==1.01)),expression(paste(q==2)),expression(paste(q==2.5)), expression(paste(q==2.8))),col = c(1,6,5,4,3,2), lty = c(1,1,1,1,1,1)) ###### qv <- 0 rr <- rqgauss(2^16,qv) nn <- 70 xrg <- sqrt((3-qv)/(1-qv)) vby <- 2*xrg/(nn) xr <- seq(-xrg,xrg,by=vby) hist (rr,breaks=xr,freq=FALSE,xlab="x",main='') y <- dqgauss(xr) lines(xr,y/sum(y*vby),cex=.5,col=2,lty=4)
Density, distribution function, quantile function and random generation for the q-gaussian distribution with parameters mu and sig.
dqgauss(x, q = 0, mu = 0, sig = 1)
dqgauss(x, q = 0, mu = 0, sig = 1)
x |
vector of quantiles. |
q |
entropic index. |
mu |
a value for q-mean. |
sig |
a value for q-variance. |
If q , mu and sig values are not specified, they assume the default values of 0, 0 and 1, respectively. Defining Z=(q-1)/(3-q), the q-gaussian distribution has density wrinten as
p(x) = (sig*Beta(alpha/2,1/2))^-1*(1+Z(x-mu)^2/sig^2)^-(1+1/Z)/2
where alpha = 1 - 1/Z when q < 1 and 1/Z when 1 < q < 3.
dqgauss gives the density, pqgauss gives the distribution function, cqgauss gives the quantile function, and rqgauss generates random deviates.
Emerson Luis de Santa Helena , Wagner Santos de Lima
Thistleton, W.,Marsh, J. A.,Nelson, K.,Tsallis, C., (2007) IEEE Transactions on Information Theory, 53(12):4805
Tsallis, C., (2009) Introduction to Nonextensive Statistical Mechanics. Springer.
de Santa Helena, E. L., Nascimento, C. M., and Gerhardt, G. J., (2015) Alternative way to charecterize a q-gaussian distribution by a robust heavy tail measurement. Physica A, (435):44-50.
Manuscript submitted for publication (2016) qGaussian: Tools to Explore Applications of Tsallis Statistics
Distributions for other standard distributions, including dt and dcauchy.
Distributions
qv <- c(2.8,2.5,2,1.01,0,-5); nn <- 700 xrg <- sqrt((3-qv[6])/(1-qv[6])) xr <- seq(-xrg,xrg,by=2*xrg/nn) y0 <- dqgauss(xr,qv[6]) plot(xr,y0,ty='l',xlim=range(-4.5,4.5),ylab='p(x)',xlab='x') for (i in 1:5){ if (qv[i]< 1) xrg <- sqrt((3-qv[i])/(1-qv[i])) else xrg <- 4.5 vby <- 2*xrg/nn xr <- seq(-xrg,xrg,by=2*xrg/nn) y0 <- dqgauss(xr,qv[i]) points (xr,y0,ty='l',col=(i+1)) } legend(2, 0.4, legend =c(expression(paste(q==-5)),expression(paste(q==0)), expression(paste(q==1.01)),expression(paste(q==2)),expression(paste(q==2.5)), expression(paste(q==2.8))),col = c(1,6,5,4,3,2), lty = c(1,1,1,1,1,1)) ###### qv <- 0 rr <- rqgauss(2^16,qv) nn <- 70 xrg <- sqrt((3-qv)/(1-qv)) vby <- 2*xrg/(nn) xr <- seq(-xrg,xrg,by=vby) hist (rr,breaks=xr,freq=FALSE,xlab="x",main='') y <- dqgauss(xr) lines(xr,y/sum(y*vby),cex=.5,col=2,lty=4)
qv <- c(2.8,2.5,2,1.01,0,-5); nn <- 700 xrg <- sqrt((3-qv[6])/(1-qv[6])) xr <- seq(-xrg,xrg,by=2*xrg/nn) y0 <- dqgauss(xr,qv[6]) plot(xr,y0,ty='l',xlim=range(-4.5,4.5),ylab='p(x)',xlab='x') for (i in 1:5){ if (qv[i]< 1) xrg <- sqrt((3-qv[i])/(1-qv[i])) else xrg <- 4.5 vby <- 2*xrg/nn xr <- seq(-xrg,xrg,by=2*xrg/nn) y0 <- dqgauss(xr,qv[i]) points (xr,y0,ty='l',col=(i+1)) } legend(2, 0.4, legend =c(expression(paste(q==-5)),expression(paste(q==0)), expression(paste(q==1.01)),expression(paste(q==2)),expression(paste(q==2.5)), expression(paste(q==2.8))),col = c(1,6,5,4,3,2), lty = c(1,1,1,1,1,1)) ###### qv <- 0 rr <- rqgauss(2^16,qv) nn <- 70 xrg <- sqrt((3-qv)/(1-qv)) vby <- 2*xrg/(nn) xr <- seq(-xrg,xrg,by=vby) hist (rr,breaks=xr,freq=FALSE,xlab="x",main='') y <- dqgauss(xr) lines(xr,y/sum(y*vby),cex=.5,col=2,lty=4)
Density, distribution function, quantile function and random generation for the q-gaussian distribution with parameters mu and sig.
pqgauss(x, q = 0, mu = 0, sig = 1, lower.tail = TRUE)
pqgauss(x, q = 0, mu = 0, sig = 1, lower.tail = TRUE)
x |
vector of quantiles. |
q |
entropic index. |
mu |
a value for q-mean. |
sig |
a value for q-variance. |
lower.tail |
logical; if TRUE (default), probabilities are P[X <= x] otherwise, P[X > x]. |
If q , mu and sig values are not specified, they assume the default values of 0, 0 and 1, respectively. Defining Z=(q-1)/(3-q), the q-gaussian distribution has density wrinten as
p(x) = (sig*Beta(alpha/2,1/2))^-1*(1+Z(x-mu)^2/sig^2)^-(1+1/Z)/2
where alpha = 1 - 1/Z when q < 1 and 1/Z when 1 < q < 3.
dqgauss gives the density, pqgauss gives the distribution function, cqgauss gives the quantile function, and rqgauss generates random deviates.
Emerson Luis de Santa Helena , Wagner Santos de Lima
Thistleton, W.,Marsh, J. A.,Nelson, K.,Tsallis, C., (2007) IEEE Transactions on Information Theory, 53(12):4805
Tsallis, C., (2009) Introduction to Nonextensive Statistical Mechanics. Springer.
de Santa Helena, E. L., Nascimento, C. M., and Gerhardt, G. J., (2015) Alternative way to charecterize a q-gaussian distribution by a robust heavy tail measurement. Physica A, (435):44-50.
Manuscript submitted for publication (2016) qGaussian: Tools to Explore Applications of Tsallis Statistics
Distributions for other standard distributions, including dt and dcauchy.
Distributions
qv <- c(2.8,2.5,2,1.01,0,-5); nn <- 700 xrg <- sqrt((3-qv[6])/(1-qv[6])) xr <- seq(-xrg,xrg,by=2*xrg/nn) y0 <- dqgauss(xr,qv[6]) plot(xr,y0,ty='l',xlim=range(-4.5,4.5),ylab='p(x)',xlab='x') for (i in 1:5){ if (qv[i]< 1) xrg <- sqrt((3-qv[i])/(1-qv[i])) else xrg <- 4.5 vby <- 2*xrg/nn xr <- seq(-xrg,xrg,by=2*xrg/nn) y0 <- dqgauss(xr,qv[i]) points (xr,y0,ty='l',col=(i+1)) } legend(2, 0.4, legend =c(expression(paste(q==-5)),expression(paste(q==0)), expression(paste(q==1.01)),expression(paste(q==2)),expression(paste(q==2.5)), expression(paste(q==2.8))),col = c(1,6,5,4,3,2), lty = c(1,1,1,1,1,1)) ###### qv <- 0 rr <- rqgauss(2^16,qv) nn <- 70 xrg <- sqrt((3-qv)/(1-qv)) vby <- 2*xrg/(nn) xr <- seq(-xrg,xrg,by=vby) hist (rr,breaks=xr,freq=FALSE,xlab="x",main='') y <- dqgauss(xr) lines(xr,y/sum(y*vby),cex=.5,col=2,lty=4)
qv <- c(2.8,2.5,2,1.01,0,-5); nn <- 700 xrg <- sqrt((3-qv[6])/(1-qv[6])) xr <- seq(-xrg,xrg,by=2*xrg/nn) y0 <- dqgauss(xr,qv[6]) plot(xr,y0,ty='l',xlim=range(-4.5,4.5),ylab='p(x)',xlab='x') for (i in 1:5){ if (qv[i]< 1) xrg <- sqrt((3-qv[i])/(1-qv[i])) else xrg <- 4.5 vby <- 2*xrg/nn xr <- seq(-xrg,xrg,by=2*xrg/nn) y0 <- dqgauss(xr,qv[i]) points (xr,y0,ty='l',col=(i+1)) } legend(2, 0.4, legend =c(expression(paste(q==-5)),expression(paste(q==0)), expression(paste(q==1.01)),expression(paste(q==2)),expression(paste(q==2.5)), expression(paste(q==2.8))),col = c(1,6,5,4,3,2), lty = c(1,1,1,1,1,1)) ###### qv <- 0 rr <- rqgauss(2^16,qv) nn <- 70 xrg <- sqrt((3-qv)/(1-qv)) vby <- 2*xrg/(nn) xr <- seq(-xrg,xrg,by=vby) hist (rr,breaks=xr,freq=FALSE,xlab="x",main='') y <- dqgauss(xr) lines(xr,y/sum(y*vby),cex=.5,col=2,lty=4)
Given a random data set, the 'qbymc' uses the medcouple, a robust measure of tail weights, to yield a 'q' value, a characteristic entropic index of the q-gaussian distributions.
qbymc(x)
qbymc(x)
x |
numeric vector |
a number q < 3, and the standard error.
Emerson Luis de Santa Helena , Wagner Santos de Lima
de Santa Helena, E. L., Nascimento, C. M., and Gerhardt, G. J., (2015) Alternative way to charecterize a q-gaussian distribution by a robust heavy tail measurement. Physica A, (435):44-50.
Robustbase for medcouple.
mc
set.seed(0002) rr <- rqgauss(1000,1.333) qbymc(rr)
set.seed(0002) rr <- rqgauss(1000,1.333) qbymc(rr)
Density, distribution function, quantile function and random generation for the q-gaussian distribution with parameters mu and sig.
rqgauss(n, q = 0, mu = 0, sig = 1, meth = "Box-Muller")
rqgauss(n, q = 0, mu = 0, sig = 1, meth = "Box-Muller")
n |
number of observations. If length(n) > 1, the length is taken to be the number required. |
q |
entropic index. |
mu |
a value for q-mean. |
sig |
a value for q-variance. |
meth |
method used at random generator |
If q , mu and sig values are not specified, they assume the default values of 0, 0 and 1, respectively. Defining Z=(q-1)/(3-q), the q-gaussian distribution has density wrinten as
p(x) = (sig*Beta(alpha/2,1/2))^-1*(1+Z(x-mu)^2/sig^2)^-(1+1/Z)/2
where alpha = 1 - 1/Z when q < 1 and 1/Z when 1 < q < 3.
For different methods use: meth = "Chaotic" , meth = "Quantile" and meth = "Box-Muller"
dqgauss gives the density, pqgauss gives the distribution function, cqgauss gives the quantile function, and rqgauss generates random deviates.
Emerson Luis de Santa Helena , Wagner Santos de Lima
Umeno, K., Sato, A., IEEE Transactions on Information Theory (Volume:59,Issue:5,May 2013).Chaotic Method for Generating q-Gaussian Random Variables.
Thistleton, W.,Marsh, J. A.,Nelson, K.,Tsallis, C., (2007) IEEE Transactions on Information Theory, 53(12):4805
Tsallis, C., (2009) Introduction to Nonextensive Statistical Mechanics. Springer.
de Santa Helena, E. L., Nascimento, C. M., and Gerhardt, G. J., (2015) Alternative way to characterize a q-gaussian distribution by a robust heavy tail measurement. Physica A, (435):44-50.
de Lima, Wagner S., de Santa Helena, E. L., qGaussian: Tools to Explore Applications of Tsallis Statistics. arXiv:1703.06172
Distributions for other standard distributions, including dt and dcauchy.
Distributions
qv <- c(2.8,2.5,2,1.01,0,-5); nn <- 700 xrg <- sqrt((3-qv[6])/(1-qv[6])) xr <- seq(-xrg,xrg,by=2*xrg/nn) y0 <- dqgauss(xr,qv[6]) plot(xr,y0,ty='l',xlim=range(-4.5,4.5),ylab='p(x)',xlab='x') for (i in 1:5){ if (qv[i]< 1) xrg <- sqrt((3-qv[i])/(1-qv[i])) else xrg <- 4.5 vby <- 2*xrg/nn xr <- seq(-xrg,xrg,by=2*xrg/nn) y0 <- dqgauss(xr,qv[i]) points (xr,y0,ty='l',col=(i+1)) } legend(2, 0.4, legend =c(expression(paste(q==-5)),expression(paste(q==0)), expression(paste(q==1.01)),expression(paste(q==2)),expression(paste(q==2.5)), expression(paste(q==2.8))),col = c(1,6,5,4,3,2), lty = c(1,1,1,1,1,1)) ###### qv <- 0 rr <- rqgauss(2^16,qv) nn <- 70 xrg <- sqrt((3-qv)/(1-qv)) vby <- 2*xrg/(nn) xr <- seq(-xrg,xrg,by=vby) hist (rr,breaks=xr,freq=FALSE,xlab="x",main='') y <- dqgauss(xr) lines(xr,y/sum(y*vby),cex=.5,col=2,lty=4)
qv <- c(2.8,2.5,2,1.01,0,-5); nn <- 700 xrg <- sqrt((3-qv[6])/(1-qv[6])) xr <- seq(-xrg,xrg,by=2*xrg/nn) y0 <- dqgauss(xr,qv[6]) plot(xr,y0,ty='l',xlim=range(-4.5,4.5),ylab='p(x)',xlab='x') for (i in 1:5){ if (qv[i]< 1) xrg <- sqrt((3-qv[i])/(1-qv[i])) else xrg <- 4.5 vby <- 2*xrg/nn xr <- seq(-xrg,xrg,by=2*xrg/nn) y0 <- dqgauss(xr,qv[i]) points (xr,y0,ty='l',col=(i+1)) } legend(2, 0.4, legend =c(expression(paste(q==-5)),expression(paste(q==0)), expression(paste(q==1.01)),expression(paste(q==2)),expression(paste(q==2.5)), expression(paste(q==2.8))),col = c(1,6,5,4,3,2), lty = c(1,1,1,1,1,1)) ###### qv <- 0 rr <- rqgauss(2^16,qv) nn <- 70 xrg <- sqrt((3-qv)/(1-qv)) vby <- 2*xrg/(nn) xr <- seq(-xrg,xrg,by=vby) hist (rr,breaks=xr,freq=FALSE,xlab="x",main='') y <- dqgauss(xr) lines(xr,y/sum(y*vby),cex=.5,col=2,lty=4)