R version 4.5.0 beta (2025-03-27 r88065 ucrt) -- "How About a Twenty-Six" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > require(glarma) Loading required package: glarma > ### Test glarmaSimModel > data("Polio") > y <- Polio[, 2] > X <- as.matrix(Polio[, 3:8]) > glarmamod <- glarma(y, X, thetaLags = c(1,2,5), type = "Poi", method = "FS", + residuals = "Pearson", maxit = 100, grad = 1e-6) > summary(glarmamod) Call: glarma(y = y, X = X, type = "Poi", method = "FS", residuals = "Pearson", thetaLags = c(1, 2, 5), maxit = 100, grad = 1e-06) Pearson Residuals: Min 1Q Median 3Q Max -2.0269 -0.9324 -0.1761 0.7719 4.4832 GLARMA Coefficients: Estimate Std.Error z-ratio Pr(>|z|) theta_1 0.21846 0.04663 4.685 2.8e-06 *** theta_2 0.12723 0.04732 2.689 0.00718 ** theta_5 0.08729 0.04226 2.066 0.03888 * Linear Model Coefficients: Estimate Std.Error z-ratio Pr(>|z|) Intcpt 0.12998 0.11160 1.165 0.244177 Trend -3.92837 2.14518 -1.831 0.067063 . CosAnnual -0.09913 0.11757 -0.843 0.399142 SinAnnual -0.53084 0.13794 -3.848 0.000119 *** CosSemiAnnual 0.21113 0.11084 1.905 0.056804 . SinSemiAnnual -0.39323 0.11561 -3.401 0.000671 *** Null deviance: 343.00 on 167 degrees of freedom Residual deviance: 250.62 on 159 degrees of freedom AIC: 536.7052 Number of Fisher Scoring iterations: 21 LRT and Wald Test: Alternative hypothesis: model is a GLARMA process Null hypothesis: model is a GLM with the same regression structure Statistic p-value LR Test 27.19 5.36e-06 *** Wald Test 38.12 2.67e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > PolioModel <- glarmaSimModel(X, beta = coef.glarma(glarmamod, type = "beta"), + phiLags = glarmamod$phiLags, + phi = rep(0.1, length(glarmamod$phiLags)), + thetaLags = glarmamod$thetaLags, + theta = rep(0.1, length(glarmamod$thetaLags)), + type = glarmamod$type, + residType = glarmamod$residType) > str(PolioModel) List of 8 $ X : num [1:168, 1:6] 1 1 1 1 1 1 1 1 1 1 ... ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:6] "Intcpt" "Trend" "CosAnnual" "SinAnnual" ... $ beta : Named num [1:6] 0.13 -3.9284 -0.0991 -0.5308 0.2111 ... ..- attr(*, "names")= chr [1:6] "Intcpt" "Trend" "CosAnnual" "SinAnnual" ... $ type : chr "Poi" $ residType: chr "Pearson" $ phiLags : num(0) $ phi : num(0) $ thetaLags: num [1:3] 1 2 5 $ theta : num [1:3] 0.1 0.1 0.1 - attr(*, "class")= chr "glarmaSimModel" > coef.glarma(glarmamod, type = "ARMA") theta_1 theta_2 theta_5 0.2184597 0.1272311 0.0872861 > PolioModel <- extractGlarmaSimModel(glarmamod) > str(PolioModel) List of 8 $ X : num [1:168, 1:6] 1 1 1 1 1 1 1 1 1 1 ... ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:6] "Intcpt" "Trend" "CosAnnual" "SinAnnual" ... $ beta : Named num [1:6] 0.13 -3.9284 -0.0991 -0.5308 0.2111 ... ..- attr(*, "names")= chr [1:6] "Intcpt" "Trend" "CosAnnual" "SinAnnual" ... $ type : chr "Poi" $ residType: chr "Pearson" $ phiLags : num(0) $ phi : num(0) $ thetaLags: num [1:3] 1 2 5 $ theta : Named num [1:3] 0.2185 0.1272 0.0873 ..- attr(*, "names")= chr [1:3] "theta_1" "theta_2" "theta_5" - attr(*, "class")= chr "glarmaSimModel" > > proc.time() user system elapsed 0.48 0.18 0.60