Standard Normal Distributions
- 格式:ppt
- 大小:125.00 KB
- 文档页数:6


Package‘ztpln’October14,2022Type PackageTitle Zero-Truncated Poisson Lognormal DistributionVersion0.1.2Date2021-10-09Author Masatoshi KatabuchiMaintainer Masatoshi Katabuchi<********************>Description Functions for obtaining the density,random variatesand maximum likelihood estimates of the Zero-truncated Poisson lognormaldistribution and their mixture distribution.License MIT+file LICENSEURL https:///mattocci27/ztplnBugReports https:///mattocci27/ztpln/issuesDepends R(>=3.5)Imports DistributionUtils,Rcpp(>=0.12.0),mixtools,statsSuggests knitr,dplyr,ggplot2,rmarkdown,testthat,tidyr(>=1.0.0)LinkingTo Rcpp(>=0.12.0),RcppEigen(>=0.3.3.3.0),RcppNumerical(>=0.3-2)VignetteBuilder knitrEncoding UTF-8RoxygenNote7.1.2NeedsCompilation yesRepository CRANDate/Publication2021-10-0914:50:02UTCR topics documented:dztpln (2)dztplnm (3)ztplnMLE (4)ztplnmMLE (5)12dztplnIndex7 dztpln The zero-truncated compund poisson-lognormal distributionsDescriptionDensity function and random generation for Zero-Trauncated Poisson Lognormal distribution withparameters mu and sd sig.Usagedztpln(x,mu,sig,log=FALSE,type1=TRUE)rztpln(n,mu,sig,type1=TRUE)Argumentsx vector of(non-negative integer)quantiles.mu mean of lognormal distribution.sig standard deviation of lognormal distribution.log logical;if TRUE,probabilities p are given as log(p).type1logical;if TRUE,Use type1ztpln else use type2.n number of random values to return.DetailsA compound Poisson-lognormal distribution is a Poisson probability distribution where its param-eterλis a random variable with lognormal distribution,that is to say logλare normally distributedwith meanµand varianceσ2(Bulmer1974).The zero-truncated Poisson-lognormal distributioncan be derived from a zero-truncated Poisson distribution.Type1ZTPLN truncates zero based on Poisson-lognormal distribution and type2ZTPLN truncateszero based on zero-truncated Poisson distribution.For mathematical details,please see vignette("ztpln") Valuedztpln gives the(log)density and rztpln generates random variates.ReferencesBulmer,M.G.1974.On Fitting the Poisson Lognormal Distribution to Species-Abundance Data.Biometrics30:101-110.See Alsodztplnmdztplnm3Examplesrztpln(n=10,mu=0,sig=1,type1=TRUE)rztpln(n=10,mu=6,sig=4,type1=TRUE)dztpln(x=1:5,mu=1,sig=2)dztplnm The zero-truncated compund poisson-lognormal distributions mixtureDescriptionDensity function and random generation for Zero-Truncated Poisson Lognormal distribution withparameters mu,sig,and theta.Usagedztplnm(x,mu,sig,theta,log=FALSE,type1=TRUE)rztplnm(n,mu,sig,theta,type1=TRUE)Argumentsx vector of(non-negative integer)quantiles.mu vector of mean of lognormal distribution in sample.sig vector standard deviation of lognormal distribution in sample.theta vector of mixture weightslog logical;if TRUE,probabilities p are given as log(p).type1logical;if TRUE,Use type1ztpln else use type2.n number of random values to return.DetailsType1ZTPLN truncates zero based on Poisson-lognormal distribution and type2ZTPLN truncateszero based on zero-truncated Poisson distribution.For mathematical details,please see vignette("ztpln") Valuedztplnm gives the(log)density and rztplnm generates random variates.function,qpois gives thequantile function,and rpois generates random deviates.See AlsodztplnExamplesrztplnm(n=100,mu=c(0,5),sig=c(1,2),theta=c(0.2,0.8))dztplnm(x=1:100,mu=c(0,5),sig=c(1,2),theta=c(0.2,0.8))dztplnm(x=1:100,mu=c(0,5),sig=c(1,2),theta=c(0.2,0.8),type1=FALSE)ztplnMLE MLE for the Zero-truncated Poisson Lognormal distributionDescriptionztplnMLEfits the Zero-truncated Poisson lognormal distribution to data and estimates parameters mean mu and standard deviation sig in the lognormal distributionUsageztplnMLE(n,lower_mu=0,upper_mu=log(max(n)),lower_sig=0.001,upper_sig=10,type1=TRUE)Argumentsn a integer vector of countslower_mu,upper_munumeric values of lower and upper bounds for mean of the variables’s natruallogarithm.lower_sig,upper_signumeric values of lower and upper bounds for standard deviatoin of the vari-ables’s natrual logarithmtype1logical;if TRUE,Use type1ztpln else use type2.DetailsThe function searches the maximum likelihood estimates of mean mu and standard deviation sig using the optimization procedures in nlminb.Valueconvergence An integer code.0indicates successful convergence.iterations Number of iterations performed.message A character string giving any additional information returned by the optimizer, or NULL.For details,see PORT documentation.evaluation Number of objective function and gradient function evaluationsmu Maximum likelihood estimates of musig Maximum likelihood estimates of sigloglik loglikelihoodExamplesy<-rztpln(100,3,2)ztplnMLE(y)ztplnmMLE MLE for the Zero-truncated Poisson Lognormal mixture distribtuionDescriptionztplnmMLEfits the Zero-truncated Poisson lognormal mixture distribution to data and estimates pa-rameters mean mu,standard deviation sig and mixture weight theta in the lognormal distribution. UsageztplnmMLE(n,K=2,lower_mu=rep(0,K),upper_mu=rep(log(max(n)),K),lower_sig=rep(0.001,K),upper_sig=rep(10,K),lower_theta=rep(0.001,K),upper_theta=rep(0.999,K),type1=TRUE,message=FALSE)Argumentsn a vector of countsK number of componentslower_mu,upper_munumeric values of lower and upper bounds for mean of the variables’s naturallogarithm.lower_sig,upper_signumeric values of lower and upper bounds for standard deviation of the vari-ables’s natural logarithmlower_theta,upper_thetanumeric values of lower and upper bounds for mixture weights.type1logical;if TRUE,Use type1ztpln else use type2.message mean of lognormal distribution in sample3.DetailsThe function searches the maximum likelihood estimators of mean vector mu,standard deviation vector sig and mixture weight vector theta using the optimization procedures in nlminb.Valueconvergence An integer code.0indicates successful convergence.iterations Number of iterations performed.message A character string giving any additional information returned by the optimizer, or NULL.For details,see PORT documentation.evaluation Number of objective function and gradient function evaluationsmu Maximum likelihood estimates of musig Maximum likelihood estimates of sigtheta Maximum likelihood estimates of thetaloglik loglikelihoodExamplesy<-rztplnm(100,c(1,10),c(2,1),c(0.2,0.8))ztplnmMLE(y)Indexdztpln,2,3dztplnm,2,3nlminb,4,5rztpln(dztpln),2rztplnm(dztplnm),3ztplnMLE,4ztplnmMLE,57。
ICP算法和NDT算法ICP(Iterative Closest Point)算法和NDT(NormalDistributions Transform)算法是在点云对齐和配准领域内被广泛使用的两种算法。
本文将从原理、步骤和应用角度对这两种算法进行详细介绍。
ICP算法是一种迭代优化算法,用于在不同视角或时间段获取到的点云数据中找到最佳的刚体变换,从而将它们对齐或配准到同一个坐标系中。
ICP算法以最小化点云之间的误差为目标,通过迭代的方式逐步优化刚体变换参数,使得两个点云之间的匹配误差最小化。
1.初始化初始的刚体变换参数,例如平移向量和旋转矩阵。
2.对于每个点对,通过刚体变换将源点云中的点映射到目标点云的坐标系中。
3.根据最小化目标函数来优化刚体变换参数。
常见的目标函数包括最小化点之间的距离、最小化法向量之间的角度差等。
4.重复步骤2和步骤3,直到满足预定义的停止条件。
然而,ICP算法也存在一些限制。
首先,ICP算法对初始的刚体变换参数比较敏感,如果初始参数选择不当,可能会导致算法陷入局部最优解。
其次,ICP算法在处理大规模点云数据时,需要较长的计算时间和内存开销。
另外,ICP算法对于非刚体变换(如非刚性变形)的情况并不适用。
与ICP算法相比,NDT算法采用统计学的方法对点云数据进行建模和匹配。
NDT算法通过将点云数据表示为高斯分布而不是单个点,从而有效地捕捉点云数据的统计特性,以便实现更精确的配准结果。
NDT算法的步骤如下:1.将目标点云数据和源点云数据进行离散化,形成离散的概率密度图。
这一步骤可以将连续的点云数据转化为离散的状态空间。
2.通过计算目标点云数据和源点云数据的概率密度图之间的差异来评估配准的误差。
常见的差异度量方法包括交叉熵、均方根误差等。
3. 优化刚体变换参数,使得目标点云数据和源点云数据的概率密度图之间的差异最小化。
这一步通常使用优化算法,如梯度下降法或Levenberg-Marquardt算法来实现。
Package‘bssn’October12,2022Type PackageTitle Birnbaum-Saunders ModelVersion1.0Date2020-02-12Author Luis Benites Sanchez[cre,aut]<******************.pe>,Rocio Paola Mae-hara[cre,aut]<******************.pe>and Paulo Jos<c3><a9>Alejandro Aybar Flo-res[ctb]<****************.edu.pe>Maintainer Rocio Paola Maehara<******************.pe>Imports sn,ssmn,mvtnorm,ClusterRDescription It provides the density,distribution function,quantile function,random number genera-tor,reliability function,failure rate,likelihood function,moments and EM algorithm for Maxi-mum Likelihood estimators,also empirical quantile and generated envelope for a given sam-ple,all this for the three parameter Birnbaum-Saunders model based on Skew-Normal Distribu-tion.Also,it provides the random number generator for the mixture of Birnbaum-Saunders model based on Skew-Normal distribution.Additionally,we incorporate the EM algo-rithm based on the assumption that the error term follows afinite mixture of Sinh-normal distri-butions.License GPL(>=2)Repository CRANNeedsCompilation noDate/Publication2020-02-1309:40:03UTCR topics documented:bssn-package (2)bssn (3)EMbssn (6)enzyme (8)FMshnReg (9)momentsbssn (11)ozone (12)reliabilitybssn (13)12bssn-packageIndex15 bssn-package Birnbaum-Saunders modelDescriptionIt provides the density,distribution function,quantile function,random number generator,reliabil-ity function,failure rate,likelihood function,moments and EM algorithm for Maximum Likelihood estimators,also empirical quantile and generated envelope for a given sample,all this for the three parameter Birnbaum-Saunders model based on Skew-Normal Distribution.Also,it provides the random number generator for the mixture of Birbaum-Saunders model based on Skew-Normal dis-tribution.Additionally,we incorporate the EM algorithm based on the assumption that the error term follows afinite mixture of Sinh-normal distributions.DetailsPackage:bssnType:PackageVersion: 1.5Date:2020-02-12License:GPL(>=2)Author(s)Rocio Maehara<*******************>and Luis Benites<************************>ReferencesVilca,Filidor;Santana,L.R.;Leiva,Victor;Balakrishnan,N.(2011).Estimation of extreme per-centiles in Birnbaum Saunders putational Statistics&Data Analysis(Print),55, 1665-1678.Santana,Lucia;Vilca,Filidor;Leiva,Victor(2011).Influence analysis in skew-Birnbaum Saunders regression models and applications.Journal of Applied Statistics,38,1633-1649.See Alsobssn,EMbssn,momentsbssn,ozone,reliabilitybssn,FMshnRegExamples#See examples for the bssnEM function linked above.bssn 3bssn Birnbaum-Saunders model based on Skew-Normal distributionDescriptionIt provides the density,distribution function,quantile function,random number generator,likeli-hood function,moments and EM algorithm for Maximum Likelihood estimators for a given sam-ple,all this for the three parameter Birnbaum-Saunders model based on Skew-Normal Distribution.Also,we have the random number generator for the mixture of Birbaum-Saunders model based on Skew-Normal distribution.Finally,the function mmmeth()is used to find the initial values for the parameters alpha and beta using modified-moment agedbssn(ti,alpha=0.5,beta=1,lambda=1.5)pbssn(q,alpha=0.5,beta=1,lambda=1.5)qbssn(p,alpha=0.5,beta=1,lambda=1.5)rbssn(n,alpha=0.5,beta=1,lambda=1.5)rmixbssn(n,alpha,beta,lambda,pii)mmmeth(ti)Argumentsti vector of observations.q vector of quantiles.p vector of probabilities.nnumber of observations.alpha shape parameter.beta scale mbda skewness parameter.piiAre weights adding to 1.Each one of them (alpha,beta and lambda)must be a vector of length g if you want to generate a random numbers from a mixture distribution BSSN.DetailsIf alpha ,sigma or lambda are not specified they assume the default values of 0.5,1and 1.5,re-spectively,belonging to the Birnbaum-Saunders model based on Skew-Normal distribution denoted by BSSN (0.5,1,1.5).As discussed in Filidor et.al (2011)we say that a random variable T is distributed as an BSSN with shape parameter α>0,scale parameter β>0and skewness parameter λin R ,if its probability density function (pdf)is given byf (t )=2φ(a (t ;α,β))Φ(λa (t ;α,β))A (t ;α,β),t >0where φ(.)and Φ(.)are the standard normal density and cumulative distribution function respec-tively.Also a (t ;α,β)=(1/α)( t/β− β/t )and A (t ;α,β)=t−3/2(t +β)/(2αβ1/2)4bssnValuedbssn gives the density,pbssn gives the distribution function,qbssn gives the quantile function,rbssn generates a random sample and rmixbssn genrates a mixture random sample.The length of the result is determined by n for rbssn,and is the maximum of the lengths of thenumerical arguments for the other functions dbssn,pbssn and qbssn.Author(s)Rocio Maehara<*******************>and Luis Benites<************************> ReferencesVilca,Filidor;Santana,L.R.;Leiva,Victor;Balakrishnan,N.(2011).Estimation of extreme per-centiles in Birnbaum Saunders putational Statistics&Data Analysis(Print),55,1665-1678.Santana,Lucia;Vilca,Filidor;Leiva,Victor(2011).Influence analysis in skew-Birnbaum Saundersregression models and applications.Journal of Applied Statistics,38,1633-1649.See AlsoEMbssn,momentsbssn,ozone,reliabilitybssnExamples##Not run:##Let s plot an Birnbaum-Saunders model based on Skew-Normal distribution!##Densitysseq<-seq(0,3,0.01)dens<-dbssn(sseq,alpha=0.2,beta=1,lambda=1.5)plot(sseq,dens,type="l",lwd=2,col="red",xlab="x",ylab="f(x)",main="BSSN Density function")#Differing densities on a graph#positive values of lambday<-seq(0,3,0.01)f1<-dbssn(y,0.2,1,1)f2<-dbssn(y,0.2,1,2)f3<-dbssn(y,0.2,1,3)f4<-dbssn(y,0.2,1,4)den<-cbind(f1,f2,f3,f4)matplot(y,den,type="l",col=c("deepskyblue4","firebrick1","darkmagenta","aquamarine4"),ylab ="Density function",xlab="y",lwd=2,sub="(a)")legend(1.5,2.8,c("BSSN(0.2,1,1)","BSSN(0.2,1,2)","BSSN(0.2,1,3)","BSSN(0.2,1,4)"),col=c("deepskyblue4","firebrick1","darkmagenta","aquamarine4"),lty=1:4,lwd=2,seg.len=2,cex=0.8,box.lty=0,bg=NULL)#negative values of lambdabssn5 y<-seq(0,3,0.01)f1<-dbssn(y,0.2,1,-1)f2<-dbssn(y,0.2,1,-2)f3<-dbssn(y,0.2,1,-3)f4<-dbssn(y,0.2,1,-4)den<-cbind(f1,f2,f3,f4)matplot(y,den,type="l",col=c("deepskyblue4","firebrick1","darkmagenta","aquamarine4"), ylab="Density function",xlab="y",lwd=2,sub="(a)")legend(1.5,2.8,c("BSSN(0.2,1,-1)","BSSN(0.2,1,-2)","BSSN(0.2,1,-3)","BSSN(0.2,1,-4)"), col=c("deepskyblue4","firebrick1","darkmagenta","aquamarine4"),lty=1:4,lwd=2,seg.len=2, cex=1,box.lty=0,bg=NULL)##Distribution Functionsseq<-seq(0.1,6,0.05)df<-pbssn(q=sseq,alpha=0.75,beta=1,lambda=3)plot(sseq,df,type="l",lwd=2,col="blue",xlab="x",ylab="F(x)",main="BSSN Distribution function")abline(h=1,lty=2)#Inverse Distribution Functionprob<-seq(0,1,length.out=1000)idf<-qbssn(p=prob,alpha=0.75,beta=1,lambda=3)plot(prob,idf,type="l",lwd=2,col="gray30",xlab="x",ylab=expression(F^{-1}~(x)),mgp=c(2.3,1,.8))title(main="BSSN Inverse Distribution function")abline(v=c(0,1),lty=2)#Random Sample Histogramsample<-rbssn(n=10000,alpha=0.75,beta=1,lambda=3)hist(sample,breaks=70,freq=FALSE,main="")title(main="Histogram and True density")sseq<-seq(0,8,0.01)dens<-dbssn(sseq,alpha=0.75,beta=1,lambda=3)lines(sseq,dens,col="red",lwd=2)##Random Sample Histogram for Mixture of BSSNalpha=c(0.55,0.25);beta=c(1,1.5);lambda=c(3,2);pii=c(0.3,0.7)sample<-rmixbssn(n=1000,alpha,beta,lambda,pii)hist(sample$y,breaks=70,freq=FALSE,main="")title(main="Histogram and True density")temp<-seq(min(sample$y),max(sample$y),length.out=1000)lines(temp,(pii[1]*dbssn(temp,alpha[1],beta[1],lambda[1]))+(pii[2]*dbssn(temp,alpha[2] ,beta[2],lambda[2])),col="red",lty=3,lwd=3)#the theoretical densitylines(temp,pii[1]*dbssn(temp,alpha[1],beta[1],lambda[1]),col="blue",lty=2,lwd=3) #the first componentlines(temp,pii[2]*dbssn(temp,alpha[2],beta[2],lambda[2]),col="green",lty=2,lwd=3) #the second component##End(Not run)EMbssn EM Algorithm Birnbaum-Saunders model based on Skew-Normal dis-tributionDescriptionPerforms the EM algorithm for Birnbaum-Saunders model based on Skew-Normal distribution. UsageEMbssn(ti,alpha,beta,delta,initial.values=FALSE,loglik=F,accuracy=1e-8,show.envelope="FALSE",iter.max=500)Argumentsti Vector of observations.alpha,beta,deltaInitial values.initial.values Logical;if TRUE,get the initial values for the parameters.loglik Logical;if TRUE,showvalue of the log-likelihood.accuracy The convergence maximum error.show.envelope Logical;if TRUE,show the simulated envelope for thefitted model.iter.max The maximum number of iterations of the EM algorithmValueThe function returns a list with11elements detailed asiter Number of iterations.alpha Returns the value of the MLE of the shape parameter.beta Returns the value of the MLE of the scale parameter.lambda Returns the value of the MLE of the skewness parameter.SE Standard Errors of the ML estimates.table Table containing the ML estimates with the corresponding standard errors.loglik Log-likelihood.AIC Akaike information criterion.BIC Bayesian information criterion.HQC Hannan-Quinn information criterion.time processing time.Author(s)Rocio Maehara<*******************>and Luis Benites<************************>ReferencesVilca,Filidor;Santana,L.R.;Leiva,Victor;Balakrishnan,N.(2011).Estimation of extreme per-centiles in Birnbaum Saunders putational Statistics&Data Analysis(Print),55, 1665-1678.Santana,Lucia;Vilca,Filidor;Leiva,Victor(2011).Influence analysis in skew-Birnbaum Saunders regression models and applications.Journal of Applied Statistics,38,1633-1649.See Alsobssn,EMbssn,momentsbssn,ozone,reliabilitybssnExamples##Not run:#Using the ozone datadata(ozone)attach(ozone)##################################The modelti<-dailyozonelevel#Initial values for the parametersinitial<-mmmeth(ti)alpha0<-initial$alpha0inibeta0<-initial$beta0initlambda0<-0delta0<-lambda0/sqrt(1+lambda0^2)#Estimated parameters of the model(by default)est_param<-EMbssn(ti,alpha0,beta0,delta0,loglik=T,accuracy=1e-8,show.envelope="TRUE",iter.max=500)#ML estimatesalpha<-est_param$res$alphabeta<-est_param$res$betalambda<-est_param$res$lambda##########################################A simple output example---------------------------------------------------------Birnbaum-Saunders model based on Skew-Normal distribution---------------------------------------------------------8enzyme Observations=116-----------Estimates-----------Estimate Std.Error z value Pr(>|z|)alpha 1.260140.236735.323110.00000beta14.65730 4.019843.646240.00027lambda 1.062770.543051.957060.05034------------------------Model selection criteria------------------------Loglik AIC BIC HQCValue-542.7684.7054.7414.719-------Details-------Iterations=415Processing time=0.4283214secsConvergence=TRUE##End(Not run)enzyme Enzymatic activity in the bloodDescriptionThese data correspond to representing the metabolism of carcinogenic substances among245unre-lated individuals.Usagedata(enzyme)Formatenzyme is a data frame with245cases(rows).DetailsFor more information about dataset see Bechtel et al.(1993).SourceBechtel,Y.,Bonaiti-Pellie,C.,Poisson,N.,Magnette,J.and Bechtel,P.(1993).A population and family study of n-acetyltransferase using caffeine urinary metabolites.Clinical Pharmacology and Therapeutics,54,134-141.FMshnReg Linear regression models usingfinite mixture of Sinh-normal distribu-tionDescriptionPerforms the EM-type algorithm with conditonal maximation to perform maximum likelihood in-ference of the parameters of the proposed model based on the assumption that the error term follows afinite mixture of Sinh-normal distributions.UsageFMshnReg(y,x1,alpha=NULL,Abetas=NULL,medj=NULL,pii=NULL,g=NULL,get.init=TRUE,algorithm="K-means",accuracy=10^-6,show.envelope="FALSE",iter.max=100)Argumentsy the response matrix(dimension nx1).x1Matrix or vector of covariates.alpha Value of the shape parameter for the EM algorithm.Each of them must be a vector of length g.(the algorithm considers the number of components to beadjusted based on the size of these vectors).Abetas Parameters of vector regression dimension(p+1)include intercept.medj a list of g arguments of vectors of values(dimension p)for the location parame-ters.pii Value for the EM algorithm.Each of them must be a vector of length g.(the algorithm considers the number of components to be adjusted based on the sizeof these vectors).g The number of cluster to be considered infitting.get.init if TRUE,the initial values are generated via k-means.algorithm clustering procedure of a series of vectors according to a criterion.The clus-tering algorithms may classified in4main categories:exclusive,overlapping,hierarchical and probabilistic.accuracy The convergence maximum error.show.envelope Logical;if TRUE,show the simulated envelope for thefitted model.iter.max The maximum number of iterations of the EM algorithmValueThe function returns a list with10elements detailed asiter Number of iterations.criteria Attained criteria value.convergence Convergence reached or not.SE Standard Error estimates,if the output shows NA the function does not provide the standard error for this parameter.table Table containing the inference for the estimated parameters.LK log-likelihood.AIC Akaike information criterion.BIC Bayesian information criterion.EDC Efficient Determination criterion.time Processing time.Author(s)Rocio Maehara<*******************>and Luis Benites<************************>ReferencesMaehara,R.and Benites,L.(2020).Linear regression models usingfinite mixture of Sinh-normal distribution.In Progress.Bartolucci,F.and Scaccia,L.(2005).The use of mixtures for dealing with non-normal regression errors,Computational Statistics&Data Analysis48(4):821-834.Examples##Not run:#Using the AIS datalibrary(FMsmsnReg)data(ais)##################################The modelx1<-cbind(1,ais$SSF,ais$Ht)y<-ais$Bfatlibrary(ClusterR)#This library is useful for using the k-medoids algorithm.FMshnReg(y,x1,get.init=TRUE,g=2,algorithm="k-medoids",accuracy=10^-6,show.envelope="FALSE",iter.max=1000)##########################################A simple output example------------------------------------------------------------Finite Mixture of Sinh Normal Regression Model------------------------------------------------------------Observations=202-----------momentsbssn11 Estimates-----------Estimate SEalpha10.813460.10013alpha2 3.048940.32140beta015.089981.70024beta10.177080.00242beta2-0.076870.00934mu1-0.254220.18069mu20.379440.38802pii10.598810.41006------------------------Model selection criteria------------------------Loglik AIC BIC EDCValue-355.625721.25737.791725.463-------Details-------Convergence reached?=TRUEEM iterations=39/1000Criteria=6.58e-07Processing time=0.725559secs##End(Not run)momentsbssn Moments for the Birnbaum-Saunders model based on Skew-NormaldistributionDescriptionMean,variance,skewness and kurtosis for the Birnbaum-Saunders model based on Skew-Normal distribution defined in Filidor et.al(2011).Usagemeanbssn(alpha=0.5,beta=1,lambda=1.5)varbssn(alpha=0.5,beta=1,lambda=1.5)skewbssn(alpha=0.5,beta=1,lambda=1.5)kurtbssn(alpha=0.5,beta=1,lambda=1.5)12ozoneArgumentsalpha shape parameterα.beta scale parameterβ.lambda skewness parameterλ.Valuemeanbssn gives the mean,varbssn gives the variance,skewbssn gives the skewness,kurtbssn gives the kurtosis.Author(s)Rocio Maehara<*******************>and Luis Benites<************************> ReferencesVilca,Filidor;Santana,L.R.;Leiva,Victor;Balakrishnan,N.(2011).Estimation of extreme per-centiles in Birnbaum Saunders putational Statistics&Data Analysis(Print),55, 1665-1678.Santana,Lucia;Vilca,Filidor;Leiva,Victor(2011).Influence analysis in skew-Birnbaum Saunders regression models and applications.Journal of Applied Statistics,38,1633-1649.See Alsobssn,EMbssn,momentsbssn,ozone,reliabilitybssnExamples##Let s compute some moments for a Birnbaum-Saunders model based on Skew normal Distribution.#The well known mean,variance,skewness and kurtosismeanbssn(alpha=0.5,beta=1,lambda=1.5)varbssn(alpha=0.5,beta=1,lambda=1.5)skewbssn(alpha=0.5,beta=1,lambda=1.5)kurtbssn(alpha=0.5,beta=1,lambda=1.5)ozone Daily ozone level measurementsDescriptionThese data correspond to daily ozone level measurements(in ppb=ppmx1000)in New York in May-September,1973,from the New York State Department of Conservation.Usagedata(ozone)Formatozone is a data frame with116cases(rows).DetailsFor a complete description of various distributions applied to data concentration of air pollutants see Gokhale and Khare(2004).SourceLeiva,V.,Barros,M.,Paula,G.e Sanhueza,A.(2007).Generalized BirnbaumSaunders distribution applied to air pollutant concentration.Environmetrics,19,235-249.Nadarajah,S.(2007).A truncated inverted beta distribution with application to air pollution data.Stoch.Environ.Res.Risk.Assess.,22,285-289.Gokhale,S.e Khare,M.(2004)A review of deterministic,stochastic and hybrid vehicular exhaust emission models International.J.Transp.Manag.,2,59-74.reliabilitybssn Reliability Function for the Birnbaum-Saunders model based on Skew-Normal distributionDescriptionTwo useful descriptors in reliability analysis are the reliability function(rf),and the failure rate(fr) function or hazard function.For a non-negative random variable t with pdf f(t)(and cdf F(t)), its distribution can be characterized equally in terms of the rf,or of the fr,which are respectively defined by R(t)=1−F(t),and h(t)=f(t)/R(t),for t>0,and0<R(t)<1.UsageRebssn(ti,alpha=0.5,beta=1,lambda=1.5)Fbssn(ti,alpha=0.5,beta=1,lambda=1.5)Argumentsti dataset.alpha shape parameterα.beta scale parameterβ.lambda skewness parameterλ.ValueRbssn gives the reliability function,Fbssn gives the failure rate or hazard function.Author(s)Rocio Maehara<*******************>and Luis Benites<************************>ReferencesLeiva,V.,Vilca-Labra,F.E.,Balakrishnan,N.e Sanhueza,A.(2008).A skewed sinh-normal distribution and its properties and application to air m.Stat.Theoret.Methods.Submetido.Guiraud,P.,Leiva,V.,Fierro,R.(2009).A non-central version of the Birnbaum-Saunders distribu-tion for reliability analysis.IEEE Transactions on Reliability58,152-160.See Alsobssn,EMbssn,momentsbssn,ozone,RebssnExamples##Let s compute some realiability functions for a Birnbaum-Saunders model based on##Skew normal Distribution for different values of the shape parameter.ti<-seq(0,2,0.01)f1<-Rebssn(ti,0.75,1,1)f2<-Rebssn(ti,1,1,1)f3<-Rebssn(ti,1.5,1,1)f4<-Rebssn(ti,2,1,1)den<-cbind(f1,f2,f3,f4)matplot(ti,den,type="l",col=c("deepskyblue4","firebrick1","darkmagenta","aquamarine4"), ylab="S(t)",xlab="t",lwd=2)legend(1.5,1,c(expression(alpha==0.75),expression(alpha==1),expression(alpha==1.5),expression(alpha==2)),col=c("deepskyblue4","firebrick1","darkmagenta","aquamarine4"),lty=1:4,lwd=2,seg.len=2,cex=0.9,box.lty=0,bg=NULL)##Let s compute some hazard functions for a Birnbaum Saunders model based on##Skew normal Distribution for different values of the skewness parameter.ti<-seq(0,2,0.01)f1<-Fbssn(ti,0.5,1,-1)f2<-Fbssn(ti,0.5,1,-2)f3<-Fbssn(ti,0.5,1,-3)f4<-Fbssn(ti,0.5,1,-4)den<-cbind(f1,f2,f3,f4)matplot(ti,den,type="l",col=c("deepskyblue4","firebrick1","darkmagenta","aquamarine4"), ylab="h(t)",xlab="t",lwd=2)legend(0.1,23,c(expression(lambda==-1),expression(lambda==-2),expression(lambda==-3), expression(lambda==-4)),col=c("deepskyblue4","firebrick1","darkmagenta","aquamarine4"), lty=1:4,lwd=2,seg.len=2,cex=0.9,box.lty=1,bg=NULL)Index∗Birnbaum-Saunders Skew-Normal bssn,3momentsbssn,11reliabilitybssn,13∗EMEMbssn,6FMshnReg,9∗FMshnFMshnReg,9∗Momentsmomentsbssn,11∗bssnbssn,3EMbssn,6∗datasetsenzyme,8ozone,12∗failure ratereliabilitybssn,13∗hazard functionreliabilitybssn,13∗packagebssn-package,2∗reliability functionreliabilitybssn,13bssn,2,3,7,12,14bssn-package,2dbssn(bssn),3EMbssn,2,4,6,7,12,14 enzyme,8Fbssn(reliabilitybssn),13 FMshnReg,2,9kurtbssn(momentsbssn),11 meanbssn(momentsbssn),11 mmmeth(bssn),3momentsbssn,2,4,7,11,12,14ozone,2,4,7,12,12,14pbssn(bssn),3qbssn(bssn),3rbssn(bssn),3Rebssn,14Rebssn(reliabilitybssn),13reliabilitybssn,2,4,7,12,13rmixbssn(bssn),3skewbssn(momentsbssn),11varbssn(momentsbssn),1115。