• Nenhum resultado encontrado

Escolha do valor inicial

Um importante ponto a ser abordado é a escolha do valor inicial para o algoritmo, que pode influenciar de forma significativa a velocidade de con- vergência do algoritmo e sua capacidade de localizar o máximo global (Karlis e Xekalaki 2002).

Na literatura pode encontrar alguns estudos que tocam o tema, sugerindo diferentes formas de abordar o problema. Como exemplo destacamos: Laird (1978) propõe o uso de um "grid" de valores para selecionar o melhor inicial, Furman e Lindsay (1994a, b) propõe o uso de estimativas obtidas com outros métodos, no caso o método de momentos.

Em Karlis e Xekalaki (2002) temos um estudo de simulação direcionado a comparar os diferentes métodos de escolha do valor inicial, uma das possibi- lidades exploradas é usar o próprio valor utilizado para simular uma mistura finita como valor inicial do algoritmo EM. No presente capítulo seguiremos a mesma ideia para as misturas consideradas.

5.3

Logística

As amostras de uma classe de misturas com duas componentes logísticas foram geradas da seguinte forma:

2. Caso u1 ≥ π1, é utilizado u2 para gerar x, tal que x = F2−1(u2) 3. Caso u1 < π1, é utilizado u2 para gerar x , tal que x = F1−1(u2) em que F−1

1 é a funcão acumulada inversa, de fórmula: Fj−1 = µj − σjln(u−1− 1), j = 1, 2.

Na estimação dos parâmetros Ψ do modelo (4.5.1) serão consideradas 100 amostras simuladadas usando as expressões (4.5.2), (4.5.3) e (4.5.4) sendo que para as duas ultimas (µq e σqrespectivamente, para q = 1 e 2) as soluções para os parâmetros foram encontrados resolvendo a equação pelo método de Newton-Raphson. A seguir temos duas tabelas: a primeira mostra contém parâmetros simulados considerando, o valor esperado para as estimativas bem como o erro quadrático médio (EQM) para as estimativas de µ e σ sempre considerando o tamanho amostral n = 100 enquanto a segunda apresenta os erros quadráticos médios e tempos de computação do algoritmo para taman- hos de amostra diferentes, considerando uma mistura com os parâmetros h(0.5, 2, 1, 3, 2).

Est. Médias EQM

(p, µ1, µ2, σ1, σ2) (.5, 2, 1, 3, 2) (0.5002, 2.0490, 1.0330, 2.3930, 1.287) (0.2570, 0.1124, 0.3936, 0.5165) (.5, −5, 4, 2, 2.75) (0.4967, −4.9882, 4.1000, 2.5833, 2.6820) (0.0237, 0.3013, 0.3320, 0.0046) (.75, 3, −4, 2, 1) (0.7490, 3.234, −3.963, 1.946, 1.051) (2.0639, 0.0907, 0.0029, 0.3532) (.5, −3, 3.5, 4, 4) (0.4981, −2.998, 3.512, 5.732, 3.646) (0.00007, 0.0062, 3.0769, 0.1293) (.5, 2, 6, 3, 5) (0.4972, 2.0360, 6.084, 2.432, 4.852) (0.1653, 0.1010, 0.3282, 0.0224) (.75, 2, 3, 2, 3) (0.7490, 2.028, 3.066, 1.808, 2.761) (0.1311, 0.3883, 0.0372, 0.0601)

Tabela 1: Estimativas e EQM para misturas de logísticas

n EQM T. de Comp.

15 (0.7707, 1.8306, 1.0684, 0.8961) 0.72 seg. 50 (0.4795, 0.2394, 0.5778, 0.6620) 1.26 seg. 100 (0.2570, 0.1124, 0.3936, 0.5165) 1.99 seg. 500 (0.0354, 0.0227, 0.3241, 0.4989) 7.54 seg.

6

Conclusão

Neste trabalho fizemos uma revisão dos conceitos à cerca de mistura finita de distribuições e identificabilidade, mostramos que as classes de misturas finitas das distribuições logística, logística generalizada, beta generalizada do segundo tipo, gama generalizada, logarítmica e skew-normal são identi- ficáveis e utilizamos o algoritmo EM para obter fórmulas para a estimação dos parâmetros de misturas de duas componentes das distribuições logística, logística generalizada, beta generalizada do segundo tipo e gama genera- lizada.

Tínhamos como objetivo, na concepção do presente trabalho, a revisão dos conceitos sobre o tema e procurar provas para novas classes de misturas de distribuições, ambos objetivos foram concluídos e ainda foi possível entrar satisfatoriamente na questão de estimação de parâmetros apresentando resul- tados. A simulação feita não apresentou problemas e o algoritmo montado no R poderia ser ajustado para contemplar outras distribuições. A exemplo da distribuição skew-t, existem ainda outras classes de misturas de distribuições para as quais a identificabilidade não foi formalmente demonstrada que pode- riam ser foco de trabalhos futuros.

Referências bibliográficas

[1] AL-HUSSAINI, E. K.; MOUSA, M. A. M. A.; SULTAN, K. S. Para- metric and nonparametric estimation of P(Y < X) for finite mixtures of lognormal components. Communications in Statistics - Theory and Method, v. 26, p. 1269-1289, 1997.

[2] AL-HUSSAINI, E. K.; SULTAN, K. S. Reliability and hazard based on finite mixture models. Handbook of Statistics, v. 20, p. 139-183, 2001.

[3] AL-HUSSAINI, E. K.; ATEYA, S. F. Maximum likelihood estimations under a mixture of truncated type I generalized logistic components model. Pioneer Journal of Theoretical and Applied Statistics, v. 2, issue 1, p. 47-60, 2003.

[4] AL-HUSSAINI, E. K.; ATEYA, S. F. Bayes estimations under a mix- ture of truncated type I generalized logistic components model. Pioneer Journal of Theoretical and Applied Statistics, v. 4, issue 2, p. 183- 208, 2005.

[5] ATEYA, S. F.; RIZK, M. M.; EL-ADLL, M. E. Estimation under finite mixture of truncated type I generalized logistic components model based on censored data via EM algorithm. International Mathematical Fo- rum, v. 6, no. 67, p. 3323-3341, 2011.

[6] ATIENZA, N.; GARCIA-HERAS, J.; MUÑOZ-PICHARDO, J.M. A new condition for identifiability of finite mixture distributions. Metrika, v. 63, p. 215-221, 2006.

[7] AZZALINI, A. A class of distributions which Includes the normal ones. Scandinavian Journal of Statistics, v. 12, p. 171-178, 1985.

[8] AZZALINI, A.; CAPITANIO, A. Distributions generated by perturba- tion of symmetry with emphasis on a multivariate skew t distribution. Journal of the Royal Statistical Society, B, v. 65, p. 367-389, 2003.

[9] BALAKRISHNAN, N. The Handbook oh the Logistic Distribu- tion. New York: Marcel Dekker, 1992.

[10] BALAKRISHNAN, N.; BASU, A.P. The Exponential Distribution: Theory, methods and Applications. New York: Gordon and Breach, 1995.

[11] BEHBOODIAN, J. On a mixture of two normal distributions. Biometrika v. 57, p. 215-217, 1970.

[12] BEHBOODIAN, J. Information matrix for a mixture of two normal distributions. Journal of Statistical Computation and Simulation, v. 1, p. 295-314, 1972.

[13] BILMES, J. A. A gentle tutorial of the em algorithm and its applica- tion to parameter estimation for gaussian mixture and hidden markov models. International Computer Science Institute, p. 1-13, 1998. [14] BRANCO, M. D.; DEY, D. K. A general class of multivariate skew

elliptical distributions. Journal of Multivariate Analysis, v. 79, p. 99-113, 2001.

[15] CASELLA, G.; BERGER, R. L. Statistical Inference. 2 ed., Califor- nia: Duxbury Press, 2002.

[16] CHANDRA, S. On the mixtures of probability distributions. Scandi- navian Journal of Statistics, v. 4, p. 105-112, 1977.

[17] CIUPERCA, G. Likehood ratio statistic for exponential mixtures. An- nals of the Institute of Statistical Mathematics, v. 54, p. 585-594, 2002.

[18] CROW, E. L.; SHIMIZU, K. Lognormal distributions - Theory and Applications. New York: Marcel Dekker, 1988.

[19] DEMPSTER, A. P.; LAIRD, N. M.; RUBIN, D. B. Maximum likelihood from incomplete data via the em algorithm Journal of the Royal Statistical Society, Series B, v. 39, p. 1-38, 1977.

[20] FISH, P. R. The Graduation of Income Distributions Econometricay, v. 29, p. 171-185, 1961.

[21] FURMAN, W.; LINDSAY, B. Measuring the relative e ectiveness ofR moment estimators as starting values in maximizing likelihoods. Com- putational Statistics and Data Analysis, v. 17, p. 493-508, 1994.

[22] FURMAN, W.; LINDSAY, B. Testing for the number of components in a mixture of normal distributions using moment estimators. Com- putational Statistics and Data Analysis, v. 17, p. 473-492, 1994.

[23] HAWSFORD, M. O. J.; GOWER, E. S. Learning an overcomplete dictionary using a cauchy mixture model for sparse decay. World Academy of Science, Engineering and Technology, v. 75, p. 1227- 1234, 2011.

[24] JOHNSON, Norman L.; KOTZ, Samuel; BALAKRISHNAN, N. Con- tinuous Univariate Distributions. Vol. 1. 2 ed. New York: John Wiley & Sons Inc., 1994.

[25] JOHNSON, Norman L.; KOTZ, Samuel; BALAKRISHNAN, N. Con- tinuous Univariate Distributions. Vol. 2. 2 ed. New York: John Wiley & Sons Inc., 1995.

[26] JOHNSON, Norman L.; KEMP, Adrienne W.; KOTZ, Samuel. Uni- variate Discrete Distributions. 3 ed. New York: John Wiley & Sons Inc., 2005.

[27] JONES, M. C.; FADDY, M. J. A skew extension of the t distribution, with applications. Journal of the Royal Statistical Society, B, v. 65, p. 159-174, 2003.

[28] JONES, M. C. Kumaraswamy’s distribution: A beta-type distribution with some tractability advantages. Statistical Methodology v. 6, p. 70-81, 2009.

[29] KAO, J. H. K. A graphical estimation of mixed Weibull parameters in life testing of electron tubes. Technometrics, v. 1, p. 389-407, 1959. [30] KARLIS, D.; XEKALAKI, E. Choosing initial values for the em algo-

rithm for finite mixtures. Computational Statistics & Data Anal- ysis,, v. 41, p. 577-590, 2002.

[31] KHODABIN, M.; AHMADABADI, A. Some properties of generalized gamma distribution. Mathematical Sciences Quarterly Journal, v. 4,no. 1, p. 9-28, 2010.

[32] KIM, H.-M.; MALLICK, B. K. Moments of random vectors with skew t distribution and their quadratic forms. Statistics and Probability Letters, v. 63, p. 417-423, 2003.

[33] KIM, H.-M.; A note on scale mixtures of skew normal distribution. Statistics and Probability Letters, v. 78, p. 1694-1701, 2008. [34] KIM, H.-M.; GENTON, M. Characteristic functions of scale mixtures

of multivariate skew-normal distributions. Journal of Multivariate Analysis, v. 102, p. 1105-1117, 2011.

[35] KLEIBER, C.;KOTZ, S. Statistical size distributions in economics and actuarial sciences. 1 ed. New York: John Wiley & Sons, Inc., 2003.

[36] KLEYDE, R.M.; DAHIYA R.C. Estimation of parameters of mixed failure time distribution from censored samples. Communications in Statistics - Theory and Methods, v. 4, p. 873-407, 1975.

[37] KUMAR, C. S.; ANUSREE M. R. On a generalized mixture of standard normal and skew normal distributions. Statistics and Probability Letters, v. 81, p. 1813-1821, 2011.

[38] KUMARASWAMY, P. A generalized probability density function for double-bounded random processes. Journal of Hydrology, v. 46, p. 79-88, 1980.

[39] LAIRD, N. Nonparametric maximum likelihood estimation of a mixing distribution. Journal of the American Statistical Association,. v. 73, p. 805-811, 1978.

[40] LANG, S. Linear Algebra. 3 ed. New York: Springer Inc., 1987. [41] LIN, T. I.; JACK C. L.; HSIEH, W. J. Robust mixture modeling using

the skew t distribution. Statistics and Computing, v. 17, p. 81-92, 2007.

[42] LIN, T. I.; JACK C. L.; SHU, Y. Y. Finite mxyure modelling using the skew normal distribution. Statistica Sinica, v. 17, p. 909-927, 2009. [43] LIN, T. I. Maximum likelihood estimation for multivariate skew normal

mixture models. Journal of Multivariate Analysis, v. 100, p. 257- 265, 2009.

[44] LIN, T. I. Robust mixture modeling using multivariate skew t distribu- tions. Statistics and Computing, v. 20, p. 343-356, 2010.

[45] LINDSAY, B. G. Mixture Models: Theory, Geometry, and Appli- cations. Hayward: Isntitute of Mathematical Statistics, v. 1, p. 389-407, 1995.

[46] MA, Y.; GENTON, G. G. A flexible class of skew-symmetric distribu- tions. Scandinavian Journal of Statistics, v. 31, p. 459-468, 2004.

[47] MAGALHÃES, Marcos Nascimento. Probabilidade e variáveis aleatórias. 2 ed.São Paulo:EDUSP, 2006.

[48] MAHMOUD, M. A. W.; MOUSTAFA, H. M. Estimation of a discrim- inant function from a mixture of two gamma distributions when the sample size is small. Mathematical and Computer Modelling, v. 18, p. 87-95, 1993.

[49] MASUYAMA, M. A mixture of two gamma distributions applied to rheumatoid arthritis. Reports of Statistical Application Research of the Union of Japanese Scientists and Engineers, v. 24, p. 28-31, 1977.

[50] MAYROSE, I.; FRIEDMAN, N.; PUPKO, T. A gamma mixture model better accounts for among site rate heterogeneity. Bioinformatics, v. 31, Suppl., p. 151-158, 2005.

[51] MCCLEAN, S. Estimation for the mixed exponential distribution using grouped follow-up data. Journal of Applied Statistics, v. 15 p. 31-37, 1986.

[52] MENDEHALL, W.; HADER, R. J. Estimation of paramaters of mixed exponentially distributed failure time distributions. Biometrika, v. 45, p. 504-520, 1958.

[53] MCCULLAGH, P. Exponential mixtures and quadratic exponential families. Biometrika, v. 81, p. 721-729, 1994.

[54] MCLACHLAN, G.J. PEEL, D. Finite mixture models. New York: Wiley, 413 p. 2000.

[55] MCLACHLAN, G.J. KRISHNAN, T. The EM Algorithm and Ex- tensions. New York: Wiley, 274 p. 1997.

[56] MURTHY,D.N.P.; XIE M; JIANG R. Weibull Models. John Wiley and Sons, 2004.

[57] NEWCOMB, S. A generalized theory of the combination of observations so as to obtain the best result. American Journal of Mathematics, v. 8, p. 343-366, 1886.

[58] PAULL, A. E. A generalized compound poisson model for consumer purchase panel data analisys. Journal of the American Statistical Association, v. 73, p. 706-713, 1978.

[59] PEARSON, K. Contributions to the mathematical theory of evolution. Philosophical Transactions, A, v. 185, p. 71-110, 1894.

[60] QUANDT, R. E. E RAMSEY, J. B. Estimating mixture of normal dis- tributions and switching regression (with discussion). Journal of the American Statistical Association, v. 73, p.730-738, 1978.

[61] RIDER, P. R. The method of moments applied to a mixture of two exponential distributions. Annals of Mathematical Statistics, v. 32, p.143-147, 1961.

[62] ROY, D.; MURKHERJEE, S. P. Generalised mixtures of exponential distributions. Journal of Applied Probability, v. 25, p.510-518, 1988.

[63] SAHU, S.K.; DEY, D. K.; BRANCO, M. A new class of multivari- ate skew distributions with applications to bayesian regression models. Canadian Journal of Statistics, v. 31, p. 129-150, 2003.

[64] SALAS-GONZALEZ, D.; KURUOGLU, E. E.; RUIZ, D. P. Finite mix- ture of α-stable distributions. Digital Signal Processing, v. 19, p. 250-264, 2009.

[65] SALAS-GONZALEZ, D.; KURUOGLU, E. E.; RUIZ, D. P. Modelling with mixture of symmetric stable distributions using Gibbs sampling. Signal Processing, v. 90, p. 774-783, 2010.

[66] SHOUKRI, M. M.; MIAN, I. U. M.; TRACY, D. S. Sampling Proper- ties of Estimators of the Log-Logistic Distribution with Application to Canadian Precipitation Data. The Canadian Journal of Statistics, v. 16, p. 223-236, 1988.

[67] SULTAN, K. S. Identifiability of finite mixtures. Annals of Mathe- matical Statistics, v. 34, p.1265-1269, 1963.

[68] TADIKAMALLA, P. R.; JOHNSON, N. L. Systems of Frequency Curves Generated by Transformations of Logistic Variables. Biometrika, v. 69, p.461-465, 1982.

[69] TEICHER, H. Identifiability of finite mixtures. The Annals of Math- ematical Statistics, v. 32, p.244-248, 1961.

[70] TAN, F.; RAYNER, G. J.; WANG, X.; PENG, H. A full likelihood procedure of exchangeable negative binomials for modelling correlated and overdispersed count data. Journal of Statistical Planning and Inference, v. 140, p.2849-2959, 2010.

[71] TEICHER, H. Identifiability of finite mixtures. The Annals of Math- ematical Statistics, v. 34, p.1265-1269, 1963.

[72] TITTERINGTON, D.M.; SMITH, A. F. M.; MAKOV U. E. Statistical analysis of finite mixture distributions. New York: Wiley, p. 246, 1985.

[73] VENTURINI, S; DOMINICI, F.; PARMIGIANI, G. Gamma shape mix- tures for heavy-talied distributions. The Annals of Applied Statis- tics, v.2, p. 756-776, 2008.

[74] VRBIK, I.; MCNICHOLAS M. R. Analytic calculations for the EM al- gorithm for multivariate skew-t mixture models. Statistics and Prob- ability Letters, v. 82, p. 1169-1174, 2012.

[75] WEBB, A. R. Gamma mixture models for target recognition. Pattern Recognition, v.33, p. 2045-2054, 2000.

[76] WILKINS, C. A. A problem concerned with the weighting of distribu- tions. Journal of the American Statistical Association, v.56, p. 281-292, 1948.

[77] YAKOWITZ, S. J.; SPARGINS, J. D. On the identifiability of finite mix- tures. Journal Of Mathematical Statistics, v.39, p. 209-214, 1968.

Apêndice A

Algebra linear

Para que um estudo eficiente de identificabilidade seja feito é necessário alguns conceitos introdutórios de algebra linear, que serão apresentados a seguir. Todas as definições do presente capítulo são apresentadas seguindo Lang (1983).

Definição 6.1 Sejam U e V dois espaços vetoriais. Uma aplicação (ou transformação) F : U → V é linear se satisfaz as duas seguintes pro- priedades:

(i) para qualquer u, v ∈ U temos:

F(u + v) = F (u) + F (v) (ii) para todo c ∈ R e v ∈ U temos:

F(cv) = cF (v).

Considere agora os espaços vetoriais U, V e W. Sejam ainda F : U → V e G : V → W duas aplicações lineares, é fácil mostrar que a composição G◦ F é também uma aplicação linear. Sendo u e v elementos de U, temos:

(G ◦ F )(u + v) = G(F (u + v)) = G(F (u) + F (v)) = G(F (u)) + G(F (v)). Por outro lado, para c ∈ R, temos:

(G ◦ F )(cu) = G(F (cu)) = G(cF (u)) = cG(F (u)). Verificando portanto que valem as duas condições da definição 2.1.

Definição 6.2 Seja F : U → V uma aplicação linear. A imagem de F é definida como o conjunto:

Segue por fim uma definição que diz respeito a isomorfismos.

Definição 6.3 Uma aplicação linear F : U → V que possui uma inversa (ou inversível) H : V → U é chamada de isomorfismo.

Apêndice B

Programação no R

# Paramêtros 1 m=c(-5,4) s=c(2,2.75) p=c(.5,.5) # Paramêtros 2 m=c(2,1) s=c(3,2) p=c(.5,.5) # Paramêtros 3 m=c(3,-4) s=c(2,1) p=c(.75,.25) # Paramêtros 4 m=c(-3,3.5) s=c(4,4) p=c(.5,.5) # Paramêtros 5 m=c(2,6) s=c(3,5) p=c(.5,.5) # Paramêtros 6 m=c(2,3) s=c(2,3) p=c(.75,.25)

# Função acumulada Inversa finv = function(u,m,s){ m - (s*log((u)ˆ-1 - 1)) }

# Mistura de 2 logísticas mlog=function(x){ fl=(p[1]/s[1])*(exp(-(x-m[1])/s[1])/(1 + exp(-(x-m[1])/s[1]))ˆ2) f=fl + (p[2]/s[2])*(exp(-(x-m[2])/s[2])/(1 + exp(-(x-m[2])/s[2]))ˆ2) return(f) } # Expressão do Passo E fpost = function(x,p,m,s,j){ fp1 = (p[j]/s[j])*exp(-(x-m[j])/s[j])/(1 + exp(-(x-m[j])/s[j]))ˆ2 fp2 = mlog(x) fp = fp1/fp2 return(fp) }

# Newton Raphson para média

NR.log<-function(erro,maxiter,x,p,m,s,j){ a = m[j]

errobs = 1 i = 0

while(errobs> erro &&i<=maxiter){

dev1= - (2/s[j]) *(exp(-(x + m[j]/s[j]))/(exp(-x/s[j]) + exp(-a/s[j]))ˆ2) dev2=(fpost(x,p,m,s,j)/s[j])*dev1

dev = 1/sum(dev2)

score1= 1 - 2 *(exp(-x/s[j])/(exp(-x/s[j]) + exp(-a/s[j]))) score2=(fpost(x,p,m,s,j)/s[j])*score1 score=sum(score2) a = a - score*dev errobs = abs(a-m[j]) i=i+1 } return(a) }

# Newton Raphson para variancia

NRS.log<-function(erro,maxiter,x,p,m,s,j){ a = s[j]

errobs = 1 i = 0

while(errobs> erro &&i<=maxiter){

dev1= ((2*(x-m[j]/aˆ3))*(- 1 + ((exp(-(x)/a))/(exp(-(x)/a) + exp(-(m[j])/a))* (2 - (x/a) + ((m[j]/a*exp(m[j]/a) + x/a*exp(x/a))/((exp(-(x)/a) + exp(- (m[j])/a)))))))) + 1/aˆ2

dev2=(fpost(x,p,m,s,j)/a)*dev1 dev = 1/sum(dev2)

score1 = ((x-m[j]/aˆ2)*(1 - 2*(exp(-(x)/a))/(exp(-(x)/a) + exp(-(m[j])/a)))) - 1/a score2 = (fpost(x,p,m,s,j)/a)*score1 score=sum(score2) a = a - score*dev errobs = abs(a-s[j]) i=i+1 } return(a) }

# Declarando as funções para as rotinas automaticas de otimização do R library(maxLik)

mu1 = function(m){

sum(fpost(x,1)*(1 - 2 *(exp(-x/s[j])/(exp(-x/s[j]) + exp(-m/s[j])))),na.rm=T) }

mu2 = function(m){

sum(fpost(x,2)*(1 - 2 *(exp(-x/s[j])/(exp(-x/s[j]) + exp(-m/s[j])))),na.rm=T) }

sig1 = function(s){

sum(fpost(x,1)*((x-m[1]/sˆ2)*(1 - 2*(exp(-(x)/s))/(exp(-(x)/s) + exp(-(m[1])/s)))) - 1/s,na.rm=T)

}

sig2 = function(s){

sum(fpost(x,2)*((x-m[2]/sˆ2)*(1 - 2*(exp(-(x)/s))/(exp(-(x)/s) + exp(-(m[2])/s)))) - 1/s,na.rm=T)

}

# Seed e amostra set.seed(9643) n=25

# Simulação

# Gerando as amostras e estimando via newton raphson n=50 #system.time( for(ii in 1:100){ set.seed(-ii+123456) u1=runif(n) u2=runif(n) x=numeric(n) for(i in 1:n){

if(u1[i]< p[1]) x[i]= finv(u2[i],m[1],s[1]) if(u1[i]>= p[1]) x[i]= finv(u2[i],m[2],s[2]) } erro = 0.001 for(j in 1:2){ pj[j] = mean(fpost(x,j)) mj[j] = NR.log(0.001,10,p,m,s,j) sj[j] = NRS.log(0.001,10,p,mk,s,j) } #s1 = maxBFGSR(sig1,start=(1),tol=1e-5,iterlim = 10,print.level=0) #s2 = maxBFGSR(sig2,start=(2.5),tol=1e-5,iterlim = 10,print.level=0) #m1 = maxBFGSR(mu1,start=(-1),tol=1e-5,iterlim = 10,print.level=0) #m2 = maxBFGSR(mu2,start=(2),tol=1e-5,iterlim = 10,print.level=0) #mj[1]= m1$estimate #mj[2]= m2$estimate #sj[1]= s1$estimate #sj[2]= s2$estimate pis=rbind(pis,pj) mis=rbind(mis,mj)

sis=rbind(sis,sj) mjs=rbind(mjs,mi) }

#)

warnings()

#Cálculo do EQM e viés mis=mis[-1,] pis=pis[-1,] sis=sis[-1,] summary(pis[,1]) summary(mis[,1]) summary(mis[,2]) summary(sis[,1]) summary(sis[,2]) m1=as.matrix(mis[,1]) m2=as.matrix(mis[,2]) s1=as.matrix(sis[,1]) s2=as.matrix(sis[,2]) vies_m1 = apply((m[1]-m1),2,mean,na.rm=T) vies_m2 = apply((m[2]-m2),2,mean,na.rm=T) eqm_m1 = apply((m[1]-m1)ˆ2,2,mean,na.rm=T) eqm_m2 = apply((m[2]-m2)ˆ2,2,mean,na.rm=T) eqm_s1 = apply((s[1]-s1)ˆ2,2,mean,na.rm=T) eqm_s2 = apply((s[2]-s2)ˆ2,2,mean,na.rm=T) eqm_m1 eqm_m2 eqm_s1 eqm_s2

Documentos relacionados