• Nenhum resultado encontrado

Dando continuidade a esta pesquisa, pretende-se melhorar o m´etodo de esti-ma¸c˜ao baseado no algoritmo EM por Monte Carlo para o modelo de regress˜ao com efeito aleat´orio substituindo o algoritmo de Metropolis-Hasting por outro m´etodo de amostragem por rejei¸c˜ao. Conseguindo melhorar esse m´etodo de estima¸c˜ao, pode-se propor medidas de influˆencia baseadas na fun¸c˜ao Q-afastamento (ZHU; LEE, 2001) para estudar medidas de influˆencia local para os modelos de regress˜ao com efeito aleat´orio.

Outra pesquisa ser´a propor um m´etodo de estima¸c˜ao para os parˆametros da distribui¸c˜ao beta Weibull modificada para dados com observa¸c˜oes censuradas, al´em de apre-sentar um modelo de regress˜ao para a distribui¸c˜ao beta Weibull modificada. Tamb´em podem ser introduzida uma an´alise de diagn´ostico (influˆencia local e res´ıduos) para esse novo modelo de regress˜ao.

REFERˆENCIAS

AARSET, M.V. How to identify bathtub hazard rate. IEEE Transactions on Reliability, New York, v. 36, n. 1, p. 106-108, 1987.

ABRAMOWITZ, M.; SEGUN, I. A. Handbook of mathematical functions. New York: Dover Publications, 1972. 1046 p.

ATKINSON, A. C. Plots, transformations and regression: an introduction to graphical methods of diagnostics regression analysis. 2nd ed. Oxford: Clarendon Press, 1987. 282 p. BARRETO, M.L.; SANTOS, L.M.P.; ASSIS, A.M.O.; ARA´UJO, M.P.N.; FARENZENA, G.G.; SANTOS, P.A.B.; FIACCONE, R.L. Effect of vitamin A supplementation on diarrohea and acute lower-respiratory-tract infections in young children in Brazil. Lancet, London, v. 344, p. 228-231, 1994.

BENNETT, S. Log-logistic regression models for survival data. Applied Statistics, London, v. 32, n. 2, p. 165-171, 1983.

BOOTH, J.G.; HOBERT, J.H. Maximizing generalized linear mixed model likelihoods with an automated Monte Carlo EM algorithm. Journal of the Royal Statistical Society: Series B, Statistical Methodology, Oxford, v. 61, n. 2, p. 265-285, 1999.

BROWN, B.W.; FLOYD, M. S.; LEVY, L.B. The log F: a distribution for all seasons. Com-putational Statistics, Berlin, v. 17, n. 1, p. 47-58, 2002.

CANCHO, V.; BOLFARINE, H.; ACHCAR, J. A. A Bayesian analysis for the exponentiated-Weibull distribution. Journal of Applied Statistical Science, New York, v. 8, n. 4, p. 227-242, 1999.

CARRASCO, J. M. F.; ORTEGA, E. M. M.; CORDEIRO, G. M. (2008). A generalized modified Weibull distribution for lifetime modeling. Computational Statistics and Data Analysis: doi 10.1016/j.CSDA.2008.08.023.

CASELLA, G.; BERGER, R. L. Statistical inference. 2nd ed. Pacific Grove: Thomson Learning, 2002. 660 p.

CASELLA, G.; GEORGE, E. I. Explaining the gibbs sampler. The American Statistician, Washington, v. 46, n. 3, p. 167-174, 1992.

CHAN, J.S.K.; KUK, A.Y.C. Maximum likelihood estimation for probit-linear mixed models with correlated random effects. Biometrics, Washington, v. 53, p. 86-97, 1997.

CHAN, K. S.; LEDOLTER, J. Monte Carlo EM Estimation for Time Series Models Involving Counts. Journal of the American Statistical Association, Boston, v. 90, n. 429, p. 242–252, 1995.

CHATTERJEE, S.; HADI, A. S. Sensitivity analysis in linear regression. New York: Wiley, 1994. 315 p.

CHEN, Z.A. A new two-parameter lifetime distribution with bathtub shape or increasing failure rate function. Statistics and Probability Letters, Amsterdam, v. 49, p. 155-161, 2000.

CHEN, J; ZHANG, D.; DAVIDIAN, M. A Monte Carlo EM algorithm for generalized linear mixed models with flexible random effects distribution. Biostatistics, v. 3, n. 3, p. 347-360, 2002.

CHIB, S.; GREENBERG, E. Understanding the Metropolis-Hastings algorithm. The Ame-rican Statistician, Washington, v. 49, n. 4, p. 327-335, 1995.

CHRISTENSEN, R.; PEARSON, L.; JOHNSON, W. Case-deletion diagnostics for mixed models. Technometrics, Alexandria, v. 34, p. 38-45, 1992.

COLLET, D. Modeling survival data in medical research. 2nd ed. London: Chapman and Hall, 2003. p.

COLOSIMO, E. A.; GIOLO, S. R. An´alise de sobrevivˆencia aplicada. S˜ao Paulo: Edgard Bl¨ucher, 2006. 392 p.

COOK, R.D. Assement of local influence (with discussion). Journal of the Royal Sta-tistical Society: Series B, StaSta-tistical Methodology, Oxford, v. 48, n. 2, p. 133-169, 1986.

. Detection of influential observations in linear regression. Technometrics, Alexandria, v. 19, p. 15-18, 1977.

COOK, R. D.; WEISBERG, S. Residuals and influence in regression. New York: Chap-man and Hill, 1982. 230 p.

COOK, R. D.; PE ˜NA, D.; WEISBERG, S. The likelihood displacement: a unifying principle for influence. Communications in Statistics: Part Theory and Methods, New York, v. 17, n. 3, p. 623-640, 1988.

COX, D.R. Regression models and life-tables (with discussion). Journal of the Royal Statistical Society: Series B, Methodological, London, v. 34, n. 2, p. 187-220, 1972. COX, D. R.; HINKLEY, D. V. Theoretical Statistics. Chapman and Hall: London, 1974. COX, D.R.; OAKES, D. Analysis of survival data. London: Chapman and Hall, 1984. 201 p.

COX, D.R.; SNELL, E.J. A general definition of residuals. Journal of the Royal Statistical Society: Series B, Methodological, London, v. 30, n. 2, p. 248-275, 1968.

DAVISON, A.C.; TSAI, C. L. Regression model diagnostics. International Statistical Review, Hague, v. 60, p. 337-355, 1992.

DEMPSTER, A. P.; LAIRD, N. M.; RUBIN, D. B. Maximum likelihood from incomplete data via the EM algorithm (with discussion). Journal of the Royal Statistical Society: Series B, Methodological, London, v. 39, n. 1, p. 1-38, 1977.

DOORNIK, J. Ox 5: Object-oriented matrix programming language. 5th ed. London : Timberlake Consultants, 2007. 461p.

ESCOBAR, L.A.; MEEKER, W.Q. Assessing influence in regression analysis with censored data. Biometrics, Washington, v. 48, n.2, p. 507-528, 1992.

EUGENE, N.; LEE, C.; FAMOYE, F. Beta-normal Distribution and its applications. Communication in Statistics - Theory and Methods, New York, v. 31, 497-512, 2002.

FACHINI, J. B.; ORTEGA, E. M. M.; LOUZADA-NETO, F. Influence diagnostics for poly-hazard models in the presence of covariates. Statistical Methods and Applications, New York, v. 17, p. 413-433, 2008.

FAMOYE, F.; LEE, C.; OLUMALADE, O. The Beta-Weibull Distribution. Journal of Statistical Theory and Applications, Holland, v. 4, p. 121-136, 2005.

FLEMING, T.R.; HARRINGTON, D.P. Counting process and survival analysis. New York: Wiley, 1991. 429 p.

GELFAND, A.E.; SMITH, A.F.M. Sampling based approaches to calculating marginal den-sities. Journal of the American Statistical Association, Boston, v. 85 , p. 398-409, 1990.

GELMAN, A.; RUBIN, D.B. Inference from iterative simulation using multiple sequences (with discussion). Statistical Science, Hayward, v. 7, n. 4, p. 457-472, 1992.

GEMAN, S.; GEMAN, D. Stochastic relaxation, gibbs distributions and the Bayesian restora-tion of images. IEEE Transacrestora-tions on Pattern Analysis and Machine Intelligence, New York, v. 6, p. 721-741, 1984.

GRADSHTEYN, I. S.; RYZHIK, I. M. Table of integrals, series and products. 7th ed. New York: Academic Press, 2007. 1171 p.

GUPTA, R. D.; KUNDU, D. Exponentiated exponential distribution: an alternative to gamma and Weibull distributions. Biometrical Journal, Berlin, v. 43, p. 117-130, 2001. GUPTA, A. K.; NADARAJAH, S. Handbook of beta distribution and its applications. New York: Marcel Dekker, 2004.

HAUPT, E.; SCHABE, H. A new model for a lifetime distribution with bathtub shaped failure rate. Microelectronic and Reliability, Kidlington, v. 32, p. 633-639, 1992.

HJORTH, U. A realibility distributions with increasing, decreasing, constant and bathtub failure rates. Technometrics, Alexandria, v. 22, n. 1, p. 99-107, 1980.

HOSMER Jr., D. W.; LEMESHOW, S. Applied survival analysis: regression modeling of time to event data. New York: John Wiley and Sons, 1999. 386 p.

IBRAHIM, J. G.; CHEN, M. H.; SINHA, D. Bayesian survival analysis. New York: Springer, 2001. 479 p.

JONES, M. C. Family of distributions arising from distribution of order statistics. Test, Madri, v. 13, p. 1-43, 2004.

KALBFLEISCH, J.D.; PRENTICE, R.L. The Statistical analysis of Failure Time Data. 2nd ed. New York: John Wiley, 2002. 439 p.

KEIDING, N.; ANDERSEN, P.K.; KLEIN, J.P. The role of frailty models and accelerated failure time models in describing heterogeneity due to omitted covariates. Statistics in Medicine, New York, v. 16, p. 215-224, 1997.

KLEIN, J. P.; MOESCHBERGER, M. L. Survival analysis: techniques for censored and truncated data. New York : Springer. 1997.

KOTZ, S.; LUMELSKII, Y.; PENSKY, M. The stress-strength model and its gene-ralizations: theory and applications. New Jersey: World Scientific Publishing. 2003. 253 p.

KUNDU, D.; RAKAB, M. Z. Generalized Rayleigh distribution: different methods of esti-mation. Computational Statistics and Data Analysis, Amsterdam, v. 49, p. 187-200, 2005.

KUO, L; PENG, F. A mixture-model approach to the analysis of survival data. Storrs: Department of Statistics, University of Connecticut, 1995, p. 95-31. Statistics Tech-nical Reports.

LAI, C. D.; XIE, M.; MURTHY, D. N. P. A modified Weibull distribution. IEEE Transac-tions on Reliability, New York, v. 52, n. 1, p. 33-37, 2003.

LAPLANTE-ALBERT, K. A. Habitat-dependent mortality risk in lacustrine fish. 2008. 123 p. M. Sc. Science . Universit´e du Qu´ebec `a Trois-Rivi`eres, Qu´ebec, 2008.

LAWLESS, J. F. Statistical models and methods for lifetime data. 2nd ed. New York: Wiley, 2003. 630 p.

LESAFFRE, E.; VERBEKE, G. Local influence in linear mixed models. Biometrics, Washington, v. 54, n. 2, p. 570-582, 1998.

LEIVA, V.; BARROS, M.; PAULA, G.A.; GALEA, M. Influence diagnostics in log-Birnbaum-Saunders regression models with censored data. Computational Statistics and Data Analysis, Amsterdam, v. 51, n. 12, p.5694-5707, 2007.

LEVINE, R. A.; CASELLA G. Implementations of the Monte Carlo EM Algorithm. Journal of Computational and Graphical Statistics, Alexandria, v. 10, n. 3, p. 422- 439, 2001. LI, H. Survival analysis methods in genetic epidemiology. Upenn Bio-statistics Working Papers. Working Paper 7. Feb. 2006. <Dispon´ıvel em:

http://biostats.bepress.com/upennbiostat/papers/art7>. Acesso em: 18 nov. 2008.

LIU, L.; YU, Z. A likelihood reformulation method in non-normal random effects models. Statistics in Medicine, New York, v. 27, p. 3105-3124, 2008.

LIANG, H.; ZOU, G. Improved AIC selection strategy for survival analysis. Computational Statistics and Data Analysis, New York, v. 52, p. 2538-2548, 2003.

LITTLE, R. J.; RUBIN, D. B. Statistical analysis with missing data. 2nd ed., New York: Wiley, 2002. 408 p.

LIU, Q.; PIERCE, D. A. A note on Gauss-Hermite quadrature. Biometrika, London, v.81, p. 624-629, 1994.

LOUIS, T. A. Finding the observed information matrix when using the EM algorithm. Jour-nal of the Royal Statistical Society: Series B, Statistical Methodology, Oxford, v. 44, n. 2, p. 226-233, 1982.

MANLY, B.F.J. Randomization, bootstrap and Monte Carlo methods in biology. 2nd ed., New York : Chapman and Hall, 1997. 399 p.

McCULLAGH, P.; NELDER, J. A. Generalized linear models. 2nd ed., London: Chap-man and Hall, 1989. 511 p.

McCULLOCH, C. E. Maximum likelihood variance components estimation for binary data. Journal of the American Statistical Association, Boston, v. 89, n. 425, p. 330-335, 1994.

McCULLOCH, C. E. Maximum likelihood algorithms for generalized linear mixed models. Journal of the American Statistical Association, Boston, v. 92, n. 437, p. 162-170, 1997.

MORRIS, C.; CHRISTIANSEN, C. Fitting Weibull duration model with random effects. Lifetime Data Analysis , Hinghan, v. 1, p. 347-359, 1995.

MUDHOLKAR, G. S.; SRIVASTAVA, D. K. Exponentiated Weibull family for analyzing bathtub failure-real data. IEEE Transaction on Reliability, New York, v. 42, p. 299-302, 1993.

MUDHOLKAR, G.S; SRIVASTAVA, D.K.; KOLLIA, G.D. A generalization of the Weibull distribution with application to the analysis of survival data. Journal of the American Statistical Association, Boston, v. 91, n. 436, p. 1575-1583, 1996.

NADARAJAH, S. On the moments of the modified Weibull distribution. Reliability Engi-neering and System Safety, Barking, v. 90, p. 114-117, 2005.

NADARAJAH, S.; GUPTA, A. K. The beta Fr´echet distribution. Far East Journal of Theoretical Statistics, Allahabad, v.14, p. 15-24, 2004.

NADARAJAH, S.; GUPTA, A. K. On the moments of the exponentiated Weibull distribution. Communications in Statistics: Part Theory and Methods, New York, v. 34, 253-256, 2005.

NADARAJAH, S.; KOTZ, S. The beta Gumbel distribution. Mathematical Problems in Engineering, New York, v. 2004, p. 323-332, 2004.

NADARAJAH, S.; KOTZ, S. On some recent modifications of Weibull distribution. IEEE Transaction on Reliability, New York, v. 54, n.4, p. 689-697, 2005.

NADARAJAH, S.; KOTZ, S. The beta exponential distribution. Reliability Engineering and System Safety, Barking, v. 91, p. 689-697, 2006

NELSON, K. P.; LIPSITZ, S. R.; FITZMAURICE, G. M.; IBRAHIM, J.; PARZEN, M.; STRAWDERMAN, R. Use of the probability integral transfomation to fit nonlinear mixed-effects models with nonnormal random mixed-effects. Journal Computational and Graphical Statistics, Alexandria, v. 15, p. 39 - 57, 2006.

NELSON, W. Applied life data analysis. New York: Wiley, 1982. 634 p.

NOCEDAL, J.; WRIGHT, S. J. Numerical optimization. 2nd ed. New York: Springer, 2006. 664 p.

ORTEGA, E. M. M.; BOLFARINE, H.; PAULA, G. A. Influence diagnostics in generalized log-gamma regression models. Computational Statistics and Data Analysis, New York, v. 42, p. 165-186, 2003.

ORTEGA, E. M. M.; CANCHO, V. G.; BOLFARINE, H. Influence diagnostics in exponentiated-Weibull regression models with censored data. Statistics and Operation Reserch Transactions, Catalunya, v. 30, n. 2, p. 171-192, 2006.

ORTEGA, E. M. M. ; PAULA, G. A. ; BOLFARINE, H. Deviance residuals in generalized log-gamma regression models with censored observations. Journal of Statistical Compu-tation and Simulation, New York, v. 78, p. 747-764, 2008.

PETTITT, A. N.; BIN DAUD, I. Case-weight measures of influence for proportional hazards regression. Applied Statistics, New York, v. 38, p. 51-67, 1989.

PHAM, H.; LAI, C. D. On Recent Generalizations of the Weibull Distribution. IEEE Trans-actions on Reliability, New York, v. 56, p. 454-458, 2007.

PRENTICE, R. L. Exponential survival with censoring and explanatory variables. Biometrika, London, v. 60, p. 279-288, 1973.

PRESS, W. H.; TEULOSKY, S.A.; VETERLING, W. T.; FLANNERY, B. P. Numerical recipes in C: the art of scientific computing. 2nd ed. London: Prentice Hall, 1992. 630 p.

RAJARSHI, S.; RAJARSHI, M. B. Bathtub distribution: a review. Communications in Statistics: Part A, Theory and Methods, New York, v. 17, p. 2597-2621, 1988.

RODRIGUEZ, R.N. A Guide to the Burr Type XII distributions. Biometrika, London, v. 64, n.1, p. 129-134, 1977.

SEARLE, S. R.; CASELLA, G.; McCULLOCH, C. E. Variance components. New York: John Wiley e Sons, 1992. 501p.

SEN, P.K.; SINGER, J.M. Large sample methods in statistics: An introduction with applications. New York: Chapman and Hall, 1993. 382 p.

SAS Institute. SAS/STAT User´s Guide: Version 9. Cary: SAS Institute. 2004. 5121 p.

TABLEMAN, M.; KIM, J. S. Survival analysis using S: analysis of time-to-data. New York: Chapman and Hall, 2004. 260 p.

TANNER, M. A. Tools for statistical inference: observed data and augmentation meth-ods. 3rd ed. New York: Springer-Verlag, 1991. 111 p.

TANNER, M. A. Tools for statistical inference: methods for the exploration of posteriori distributions and likelihood functions. 3rd ed. New York: Springer-Verlag, 1996. 221 p.

THERNEAU, T.M.; GRAMBSCH, P.M.; FLEMING, T.R. Martingale-based residuals for survival models. Biometrika, London, v. 77, p. 147-60, 1990.

VAIDA, F.; FITZGERALD, A. P.; DeGRUTTOLA, V. Efficient hybrid EM for linear and nonlinear mixed effects models with censored response. Computational Statistics and Data Analysis, Amsterdam, v. 51 , n. 12, p. 5718-5730, Aug. 2007.

VALEN ¸CA, D.M. Teste de homogeneidade e estima¸c˜ao para dados de sobrevivˆencia agrupados e com erros de medidas. 2003. 151p. Tese (Doutorado em Estat´ıstica) -Instituto de Matem´atica e Estat´ıstica, Universidade de S˜ao Paulo, S˜ao Paulo, 2003.

WANG, F. K. A new model with bathtub-shaped failure rate using an additive Burr XII distribution. Reliability Engineering and System Safety, Barking, v. 70, p. 305-312, 2000.

WEI, B.; HU, Y.Q.; FUNG, W.K. Generalized leverage and its applications. Scandinavian Journal of Statistics, Oxford, v. 25, p. 25-37, 1998.

WEI, G. C. G.; TANNER, M. A. Monte Carlo Implementation of the EM Algorithm and the Poor Man’s Data Augmentation Algorithms Journal of the American Statistical Association, Boston, v. 85, p. 699- 704, Sept. 1990.

WEISSFELD, L. A. Influence diagnostics for the proportional hazards models. Statistics and Probability Letters, Amsterdam, v. 10, p. 411-417, 1990.

WEISSFELD, L. A.; SCHNEIDER, H. Influence diagnostics for the Weibull model fit to censored data. Statistics and Probability Letters, Amsterdam, v. 9, p.67-73, 1990. WEISBERG, S. Applied linear regression. 2nd ed. New York: Wiley, 1985. 324 p. WU, C. F. J. On the convergence properties of the EM algorithm. Annals of Statistics, Hayward, v. 11, p. 95-103, 1983.

XIE, M.; LAI, C.D. Reliability analysis using an additive Weibull model with bathtub-shaped failure rate function. Reliability Engineering and System Safety, Barking, v. 52, p. 87-93, 1996.

XIE, M.; TANG, Y.; GOH, T.N. A modified Weibull extension with bathtub failure rate function. Reliability Engineering and System Safety, Barking, v. 76, p. 279-285, 2002. XIE, F.; WEI, B. Diagnostics analysis for log-Birnbaum-Saunders regression models. Com-putational Statistics and Data Analysis, Amsterdam, v. 51, n. 9, p. 4692-4706, 2007. ZIMMER, W.J.; KEATS, J.B.; WANG F.K. The Burr XII distribution in reliability analysis. Journal of Quality Technology, Milwaukee, v. 30, p. 389-394, 1998.

ZHU, H.; LEE, S. Local influence for incomplete-data models. Journal of the Royal Statistical Society: Series B, Statistical Methodology, Oxford, v. 63, n. 1, p. 111-126, 2001.

Apˆendice A - Elementos da matriz de informa¸c˜ao observada para o modelo de regress˜ao log-Weibull estendida

Lλλ = −r λ2 Lλσ = 1 σ n X i=1 zihiexp(xT i β) Lλβj = n X i=1 xijexp(xTi β) + 1 σ n X i=1 xijexp(xTi β)hi h 1 − σ exp(−zi) i Lσσ = r σ2 + 1 σ2 X i²F n zi h 2 + exp(zi)(zi+ 2) io + λ σ2 n X i=1 ziexp(xTi β)hi h − 2 − zi(1 + exp(zi)) i Lσβj = 1 σ2 X i²F xijh1 + exp(zi)(1 + zi)i+ λ σ2 n X i=1 xijexp(xTi β)hi h − 1 + zi(σ − 1 − exp(zi)) i Lβjβs = 1 σ2 X i²F xijxisexp(zi) + λ n X i=1 xijxisexp(xT i β) +λ σ2 n X i=1 xijxisexp(xT i β)hi h 2σ − 1 − σ2exp(−zi) − exp(zi) i em que j, s = 1, 2, . . . , p, hi = exp ³ zi+ exp(zi) ´ e zi = yi−xT iβ σ

Apˆendice B: Demonstra¸c˜ao do teorema 1

Para a distribui¸c˜ao log-Burr XII (15), a fun¸c˜ao geradora de momentos ´e dada pela resolu¸c˜ao da seguinte equa¸c˜ao

MY(T ) = E(exp(ty)) = Z −∞ exp(ty)kc · 1 +³exp(y) s ´c¸−k−1³exp(y) s ´c dt

Fa¸ca a seguinte mudan¸ca de vari´avel u = ³ exp(y) s ´c , ent˜ao, du = c ³ exp(y) s ´c dy. Portanto, MY(T ) = Z −∞ (su1c)tk(1 + u)−k−1du

Agora, fa¸ca outra mudan¸ca de vari´avel, considere que v = 1

1+u, ent˜ao dv = −(1 + u)−2du. E

reescreva a integral MY(T ) = Z 1 0 −stk(1 − v)ctv−t c+k−1dv kstB · t c + 1, k − t c ¸ , se kc > t

em que B(a, b) ´e a fun¸c˜ao beta completa (LAWLESS, 2003). Para obter a segunda identidade, reorganize o integrando como o n´ucleo da fun¸c˜ao de densidade da distribui¸c˜ao beta.

Apˆendice C - Elementos da matriz de informa¸c˜ao observada para o modelo de regress˜ao log-Burr XII

Lkk = − r k2 L = n X i=1 zi σhi Lj = n X i=1 xij σ hi Lσσ = r σ2 + 2 σ2 X i²F zi− 2(k + 1)X i²F zi σ2hi− (k + 1)X i²F ³zi σ ´2 hi+ X i²F ³zi σhi ´2 − kX i²C zi σ2hi − kX i²C ³zi σ ´2 hi+ k n X i=1 ³zi σhi ´2 Lσβj = X i²F xij σ2 − (k + 1)X i²F ³xij σ2 +xij zi σ 2´ hi+X i²F xij σ zi σhi 2 −kX i²C ³xij σ2 +xij zi σ 2´ hi+ k n X i=1 xij σ zi σhi 2 Lβjβs = −(k + 1)X i²F xijxis σ2 hi+ (k + 1)X i²F xijxis σ2 hi2 kX i²C xijxis σ2 hi+ kX i²C xijxis σ2 hi2 em que j, s = 1, 2, . . . , p, hi = exp(zi) 1+exp(zi) e zi = yi−xT iβ σ

Apˆendice D - Programa na linguagem de programa¸c˜ao matricial Ox para verificar o desempenho do modelo de regress˜ao log-Burr XII por meio do teste da raz˜ao de verossimilhan¸ca

//**PROGRAMA para simular de New Weibull e testar logistica**// #include<oxstd.h> #include<oxdraw.h> #include<oxfloat.h>

#include<maximize.h> #include<simula.h> #import<maximize> #pragma link("maximize.oxo")

static decl s_mT; //dados T simulados static decl s_mX; //covari´avel simulada static decl s_mC;//censura simulada

static decl dados; // valores de y e da censura

log_vero(const vP,const adFunc, const avScore,const amHessian) { decl n=rows(s_mT); decl cont,y,cens,xx0, xx1 ; decl uns=ones(n,1); decl vero=zeros(1,n); decl a1=fabs(vP[0][0]); //k

decl a2=fabs(vP[1][0]); //sigma decl a3=vP[2][0]; //beta 0 decl a4=vP[3][0]; //beta 1

for(cont=0;cont<n;++cont) { //y=log(dados[cont][0]);

y=log(dados[cont][0]); cens=s_mC[cont][0]; xx0=1; xx1=s_mX[cont][0]; decl xbeta=xx0*a3+xx1*a4; decl z=(y-xbeta)/a2;

if(dados[cont][1]==1)

vero[0][cont]=log(a1)-log(a2)+z-(a1+1)*log(1+exp(z)); if(dados[cont][1]==0) vero[0][cont]= -a1*log(1+exp(z)); } adFunc[0]=double(vero*uns); return 1; }

///////////////////////////////////////////////////////////////////////////// log_vero1(const vP1,const adFunc1, const avScore,const amHessian) {

decl n=rows(s_mT); decl cont,y,cens,xx0, xx1 ; decl uns=ones(n,1); decl vero1=zeros(1,n); decl a2=fabs(vP1[0][0]); //sigma

for(cont=0;cont<n;++cont) { //y=log(dados[cont][0]);

y=log(dados[cont][0]); cens=s_mC[cont][0]; xx0=1; xx1=s_mX[cont][0]; decl xbeta=xx0*a3+xx1*a4; decl z=(y-xbeta)/a2;

if(dados[cont][1]==1) vero1[0][cont]=-log(a2)+z-(1+1)*log(1+exp(z)); if(dados[cont][1]==0) vero1[0][cont]= -1*log(1+exp(z)); } adFunc1[0]=double(vero1*uns); return 1; } ///////////////////////////////////////////////////////////////////////////// main() { decl nc=30; decl dfunc; decl dfunc1; decl rep=1000; decl

inter=0; decl ncensur=zeros(rep,1); decl lambda=zeros(rep,1);

do { decl unif; unif=ranu(nc,1); s_mX=ranu(nc,1); print(" os valores da covari´avel \n", s_mX);

//gerando T

decl beta0=-3; decl beta1=3; decl uns1=ones(nc,1);

decl alpha=exp(beta0.*uns1+beta1.*s_mX[][0]); decl k=0.27; decl sigma=0.36;

s_mT=alpha.*(((1-unif).^(-1/k))-1).^sigma; decl m; decl scensur;

scensur=0; dados=ones(nc,2); s_mC=0.4*ranu(nc,1);

for (m=0; m<nc; m++) { if (s_mC[m][0]-s_mT[m][0] < 0 && scensur <3) { dados[m][0]= s_mC[m][0]; dados[m][1]=0; scensur=scensur+1; } else {dados[m][0]= s_mT[m][0]; } }

print(" os valores de T e da censura \n", dados); decl vP=<0.27;0.36;-3;3>; log_vero(vP,&dfunc,0,0); decl mhess=0.00001*unit(4);

decl ir; MaxControl(-1,20);

ir=MaxBFGS(log_vero,&vP,&dfunc,&mhess,1);

////////////////////////////////////////////////////////// decl vP1=<0.36;-3;3>; log_vero1(vP1,&dfunc1,0,0); decl ir1; MaxControl(100,20);

ir1=MaxBFGS(log_vero1,&vP1,&dfunc1,&mhess,1);

////////////////////////////////////////////////////////// if (ir == MAX_CONV && ir1 == MAX_CONV )

{ print(" os valores dos parametros \n", vP); print(" os valores dos parametros \n", vP1);

println("vero=" ,dfunc); println("vero1=" ,dfunc1); decl verologistica=dfunc1; decl veroburr=dfunc; ncensur[inter][0]=sumc(dados[][1]);

//teste da raz~ao de verossimilhan¸ca

lambda[inter][0]=-2*(verologistica-veroburr); ++inter; } } while (inter<rep);

print(" teste da razao de verossimilhanca \n", lambda); print(" n´umero de censuras na amostra \n", ncensur);

decl j; decl pvalor=ones(rep,1); for (j=0; j<rep; j++) { if (lambda[j][0] > 3.841459)

{ pvalor[j][0]= 1; } else

{pvalor[j][0]= 0; } }

decl contagem=sumc(pvalor); print("numero de amostras em que H0 ´e rejeitada \n", contagem); }

Apˆendice E - Programa na linguagem de programa¸c˜ao matricial OX para simular res´ıduo tipo martingale a partir do modelo de regress˜ao log-Weibull estendida e programa no software R para obter gr´afico de probabilidade normal dos res´ıduos simulados

//**PROGRAMA PARA CRIAR GERAR RES´IDUO TIPO MARTINGALE **// //**Modelo log-Weibull estendida**//

#include<oxstd.h> #include<oxdraw.h> #include<oxfloat.h> #include<maximize.h> #include<simula.h> #import<maximize> #pragma link("maximize.oxo")

static decl s_mT; //dados T simulados static decl s_mX; //covari´avel simulada static decl s_mC;//censura simulada

static decl dados; // valores de y e da censura

log_vero(const vP,const adFunc, const avScore,const amHessian) { decl n=rows(s_mT); decl cont,y,cens,xx0, xx1 ; decl uns=ones(n,1); decl vero=zeros(1,n); decl a1=fabs(vP[0][0]); //lambda

decl a2=fabs(vP[1][0]); //sigma decl a3=vP[2][0]; //beta 0 decl a4=vP[3][0]; //beta 1

for(cont=0;cont<n;++cont) { y=log(dados[cont][0]); cens=s_mC[cont][0]; xx0=1; xx1=s_mX[cont][0]; decl xbeta=xx0*a3+xx1*a4; decl z=(y-xbeta)/a2;

if(dados[cont][1]==1) vero[0][cont]=log(a1+0.00000000001)

-log(a2+0.00000000001)+xbeta+z+exp(z)+a1*exp(xbeta)*(1-exp(exp(z))); if(dados[cont][1]==0) vero[0][cont]= a1*exp(xbeta)*(1-exp(exp(z))); }

adFunc[0]=double(vero*uns); return 1; }

main() { decl nc=30; decl dfunc; decl rep=1000; decl res=zeros(nc,rep); decl residuos=zeros(nc,rep); decl

ordelinha=zeros(nc,rep); decl inter=0; decl ncensur=zeros(rep,1); do {

decl unif; unif=ranu(nc,1); print(" os valores DA UNIFORME \n", unif); s_mX=ranu(nc,1); print(" os valores da covari´avel \n", s_mX); //gerando T

decl beta0=-3; decl beta1=3; decl uns1=ones(nc,1); decl

alpha=exp(beta0.*uns1+beta1.*s_mX[][0]); decl lambda=0.1; decl sigma=2;

s_mT=( ((alpha).^(1/sigma)).*log(1-(log(1-unif)./(lambda.*alpha))) ).^(sigma);

print(" os valores simulados \n", s_mT);

decl m; decl scensur; scensur=0; dados=ones(nc,2);

s_mC=0.5*ranu(nc,1); print(" os valores simulados da censura \n", s_mC); for (m=0; m<nc; m++) { if (s_mC[m][0]-s_mT[m][0] < 0 && scensur < 3) { dados[m][0]= s_mC[m][0]; dados[m][1]=0; scensur=scensur+1; } else {dados[m][0]= s_mT[m][0]; } }

print("n´umero de censurados \n", scensur); print(" os valores de T e da censura \n", dados);

decl vP=<0.1;2;-3;3>; log_vero(vP,&dfunc,0,0); println("vero=" ,dfunc);

decl mhess=0.00001*unit(4); decl ir; MaxControl(-1,20);

ir=MaxBFGS(log_vero,&vP,&dfunc,&mhess,1); if (ir == MAX_CONV) { print(" os valores dos parametros \n", vP);

ncensur[inter][0]=sumc(dados[][1]); decl xbeta1=(vP[2][0]*uns1+

decl zz=(log(s_mT[][0])-xbeta1); decl zzz=zz./fabs(vP[1][0]); decl sob2=1-exp(exp(zzz)); decl

sob3=exp(fabs(vP[0][0]).*exp(xbeta1).*sob2); print(" os valores de sob3 \n", sob3);

decl martingal= dados[][1]+log(sob3+0.000000000001); res[][inter]= (martingal./fabs(martingal)).*

(1.4142*(-martingal-(dados[][1].*log(dados[][1]-martingal))).^(1/2));; decl resorde=(sortc(res[][inter])); residuos[][inter]=resorde;

++inter; } } while (inter<rep);

print(" os valores dos residuos simulados \n", res); print(" n´umero de censuras na amostra \n", ncensur);

decl j; decl mresults = zeros (nc,3); for (j=0; j < nc; ++j) { // calculando estat´ısticas

mresults[j][0]=min(residuos[j][]); mresults[j][1]=meanr(residuos[j][]);

mresults[j][2]=max(residuos[j][]); } print(" estat´ısticas dos valores simulados \n", mresults); print(" n´umero de itera¸c~oes \n", inter); }

library(RODBC)

x1<-seq(-3,3,0.01) y1<-x1

# Read EXCEL sheet containing spatial data channel

<-odbcConnectExcel("MARTI_50_SC.xls") MARTISC <- sqlFetch(channel, "MARTI_50_SC") odbcClose(channel)

channel odbcConnectExcel("DEVI_50_SC.xls") DEVISC <-sqlFetch(channel, "DEVI_50_SC") odbcClose(channel) q1<-qqnorm(MARTISC$res50ESC,plot.it = FALSE)

q2<-qqnorm(DEVISC$res50ESC,plot.it = FALSE)

plot(range(q1$x, q2$x), range(q1$y, q2$y), type = "n",,main = "", xlab="Percentis da N(0,1)",ylab="Res´ıduo") points(q1,col =

"blue",pch=1) points(q2, col = "red", pch = 3) lines(x1,y1) texto<-expression(r[M],r[D])

legend("bottomright",texto,text.col=c("blue","red"),col=c("blue","red"),pch = c(1,3), cex = 1,bty = "o" )

mtext("0% de censura", cex = 0.8, line =1,side=3)

legend("topleft",expression(k=="0,27"), cex = 1,bty = "n")

Apˆendice F - Programa na linguagem de programa¸c˜ao matricial OX para estimar os parˆametros do modelo de regress˜ao log-Weibull estendida ajustado aos dados dos peixes da esp´ecie Golden Shiner usando o m´etodo de m´axima verossimilhan¸ca e calcular os res´ıduos

//**PROGRAMA PARA ESTIMAR OS PAR^AMETROS DO MODELO LOG NOVA WEIBULL ESTENDIDA**//

//**DADOS REAIS - PEIXES DA EXP´ECIE GOLDEN SHINER**// #include<oxstd.h> #include<oxdraw.h> #include<oxfloat.h>

#include<maximize.h> #include<simula.h> #pragma link("maximize.oxo") static decl g_mY; static decl g_mX;

log_vero(const vP,const adFunc, const avScore,const amHessian) { decl n=rows(g_mY); decl cont,y,xx0, xx1, xx2, xx3, xx4,xx5, xx6, xx7; decl uns=ones(n,1); decl vero=zeros(1,n); decl

a1=fabs(vP[0][0]); //lambda decl a2=fabs(vP[1][0]); //sigma decl a3=vP[2][0]; //beta 0 decl a4=vP[3][0]; //beta 1 decl a5=vP[4][0]; //beta 2 decl a6=vP[5][0]; //beta 3 decl a7=vP[6][0]; //beta 4 decl a8=vP[7][0]; //beta 5 decl a9=vP[8][0]; //beta 6 decl a10=vP[9][0]; //beta 7 for(cont=0;cont<n;++cont) { y=g_mY[cont][0]; xx0=g_mY[cont][2]; xx1=g_mY[cont][3]; xx2=g_mY[cont][4]; xx3=g_mY[cont][5];

xx4=g_mY[cont][6]; xx5=g_mY[cont][7]; xx6=g_mY[cont][8]; xx7=g_mY[cont][9];

decl z=(y-(xbeta))/a2;

if(g_mY[cont][1]==1) vero[0][cont]=log(a1+0.00000000001)

-log(a2+0.00000000001)+xbeta+z+exp(z)+a1*exp(xbeta)*(1-exp(exp(z))); if(g_mY[cont][1]==0) vero[0][cont]= a1*exp(xbeta)*(1-exp(exp(z))); } adFunc[0]=double(vero*uns);

return 1; } main() {

g_mY = loadmat("c:\TESE\New_Weibull\especie22.txt") ; //print(" Dados",g_mY);

decl nc=rows(g_mY); decl dfunc; decl avScore; decl

vP=<0.5;3;5.3439;1.9119;0.1054;-0.1229;0.0367;0.0364;0.2627;-0.09434>; log_vero(vP,&dfunc,&avScore,0); println("vero=" ,dfunc);

MaxControl(-1,20); decl mhess=0.00001*unit(4); decl ir, var; ir=MaxBFGS(log_vero,&vP,&dfunc,&mhess,1);

Num1Derivative(log_vero,vP,&avScore);

Num2Derivative(log_vero,vP,&mhess); var=invertsym((-1)*mhess); print(" os valores das vari^ancias \n",var); print(" os valores dos parametros \n", vP); print(" os valores score \n", avScore);

decl zz=(g_mY[][0]-(vP[2][0].*g_mY[][2]+ vP[3][0].*g_mY[][3]+ vP[4][0].*g_mY[][4]+ vP[5][0].*g_mY[][5]+ vP[6][0].*g_mY[][6]+ vP[7][0].*g_mY[][7]+ vP[8][0].*g_mY[][8]+ vP[9][0].*g_mY[][9])); print(" os valores de zz \n", zz); decl xbeta1=(vP[2][0].*g_mY[][2]+ vP[3][0].*g_mY[][3]+ vP[4][0].*g_mY[][4]+ vP[5][0].*g_mY[][5]+ vP[6][0].*g_mY[][6]+ vP[7][0].*g_mY[][7]+ vP[8][0].*g_mY[][8]+ vP[9][0].*g_mY[][9]); print(" os valores de xbeta1 \n", xbeta1);

decl res=zz./vP[1][0]; print(" os valores dos residuos \n", res); decl sob1=exp(res); print(" os valores de exp(res) \n", sob1); decl sob2=1-exp(sob1);

print(" os valores de 1-exp(exp(res)) \n", sob2); decl sob3=exp(vP[0][0].*exp(xbeta1).*sob2);

print(" os valores de sob estimada para y\n", sob3);

decl martingale= g_mY[][1]+log(sob3); print(" os valores do residuo martingale \n", martingale);

decl tipmartin= (martingale./fabs(martingale)).*

(1.4142*(-martingale-(g_mY[][1].*log(g_mY[][1]-martingale))).^(1/2)); print(" os valores do residuo tipo martingale \n", tipmartin);

}

Apˆendice G - Programa na linguagem de programa¸c˜ao matricial OX para obter as estimativas de jackknife e medidas de influˆencia global para o modelo de regress˜ao log-Weibull estendida ajustado aos dados dos peixes da esp´ecie Golden Shiner //**PROGRAMA PARA ESTIMAR OS PAR^AMETROS DO MODELO DE REGRESS~AO**\\

//**LOG-NOVA WEIBULL ESTENDIDA - M´etodo de Jackknife**// //**MEDIDAS DE INFLU^ENCIA GLOBAL **//

//**DADOS PEIXES DA ESP´ECIE GOLDEN SHINER**// #include<oxstd.h> #include<oxdraw.h> #include<oxfloat.h>

#include<maximize.h> #include<simula.h> #pragma link("maximize.oxo") static decl g_mY; static decl g_mX;

log_vero(const vP,const adFunc, const avScore,const amHessian) { decl n=rows(g_mY);

decl cont,t,xx0, xx1, xx2, xx3, xx4,xx5, xx6, xx7; decl uns=ones(n,1); decl vero=zeros(1,n);

decl a3=vP[2][0]; //beta 0 decl a4=vP[3][0]; //beta 1 decl a5=vP[4][0]; //beta 2 decl a6=vP[5][0]; //beta 3 decl a7=vP[6][0]; //beta 4 decl a8=vP[7][0]; //beta 5 decl a9=vP[8][0]; //beta 6 decl a10=vP[9][0]; //beta 7 for(cont=0;cont<n;++cont) {

//t=log(g_mY[cont][0]);

t=g_mY[cont][0]; xx0=g_mY[cont][2]; xx1=g_mY[cont][3]; xx2=g_mY[cont][4]; xx3=g_mY[cont][5]; xx4=g_mY[cont][6]; xx5=g_mY[cont][7]; xx6=g_mY[cont][8]; xx7=g_mY[cont][9];

decl xbeta=xx0*a3+xx1*a4+xx2*a5+xx3*a6+xx4*a7+xx5*a8+xx6*a9+xx7*a10;

Documentos relacionados