Created
October 27, 2025 10:29
-
-
Save BERENZ/bfb5f90886a619b76dd520d3bdee2c76 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(robmixglm) | |
| library(robustbase) | |
| # data | |
| data_for_model <- structure(list(border = c(28L, 2L, 7L, 56L, 28L, 1L, 37L, 10L, | |
| 1L, 198L, 3L, 1L, 16L, 7L, 1L, 11L, 8L, 14L, 13L, 3L, 590L, 6L, | |
| 4L, 2L, 3L, 70L, 4L, 17L, 4L, 1L, 18L, 1L, 12L, 2L, 4L, 14L, | |
| 30L, 207L, 8L, 2L, 2L, 1L, 25L, 11L, 31L, 9L, 2L, 128L, 12L, | |
| 2L, 43L, 61L, 57L, 11L, 47L, 1L, 2L, 835L, 2L, 105L, 4L, 111L, | |
| 6L, 3L, 7L), zus_log = c(7.08422642209792, 5.5683445037611, 6.9555926083963, | |
| 9.701371368414, 8.46041117731725, 5.85507192220243, 8.54539184577492, | |
| 8.61558951327243, 8.2728260036504, 11.9224091544202, 7.55799495853081, | |
| 6.27287700654617, 8.49617382419216, 6.1779441140506, 6.05208916892442, | |
| 7.3790081276283, 7.40610338123702, 7.99260665240021, 6.70073110954781, | |
| 8.53915035876828, 10.7471645798978, 5.82304589548302, 4.11087386417331, | |
| 5.26269018890489, 8.6978466911095, 10.1375314783186, 6.95272864462487, | |
| 6.73578001424233, 6.47697236288968, 6.41673228251233, 8.24170315972982, | |
| 6.57228254269401, 7.6377164326648, 6.71174039505618, 5.2257466737132, | |
| 6.1246833908942, 7.36327958696304, 9.93372573559674, 7.13886699994552, | |
| 6.09582456243222, 5.47646355193151, 5.97635090929793, 7.80384330353877, | |
| 8.57357352485234, 7.60090245954208, 9.02545553277906, 5.87493073085203, | |
| 9.70436565706383, 6.74523634948436, 7.95717732345947, 7.19368581839511, | |
| 7.31121838441963, 7.86057078553866, 7.49220304261874, 9.48082541959944, | |
| 5.32787616878958, 5.30330490805908, 13.5858483060129, 7.87092959675514, | |
| 8.94936514235297, 6.12905021006055, 9.30918973601835, 8.53149049611706, | |
| 5.70711026474888, 7.28619171470238), pol_zus_log = c(-5.00478488041808, | |
| -4.46973221509299, -4.31653527878104, -3.79328843024506, -3.42345857490362, | |
| -5.16192474164248, -4.02360326872588, -5.1498536104727, -2.73156245849197, | |
| -4.77170769682765, -5.16009968573244, -4.48111753731811, -4.83261217806252, | |
| -3.53888678443534, -4.1061790198691, -4.8941014778403, -4.3150609278787, | |
| -4.55861944791506, -4.62128956786797, -4.05051398903614, -2.75118410513401, | |
| -5.12989871492307, -3.41772668361337, -4.56954300834494, -8.00469951054955, | |
| -5.2175505524905, -4.38777928716333, -3.55772618389438, -3.91202300542815, | |
| -6.41673228251233, -4.80771595524467, -4.96284463025991, -4.92966623156259, | |
| -3.37953588488098, -3.6163087612791, -5.0260711022261, -4.36754731340905, | |
| -3.45829301889265, -4.65396035015752, -4.99721227376411, -4.78331637137157, | |
| -3.33729357968268, -4.09027123683446, -6.37634894751613, -4.30506559353775, | |
| -7.23369606355101, -4.48863636973214, -4.10594369806545, -3.97264762724458, | |
| -4.91265488573605, -4.62873646093357, -3.39919537899148, -3.96875048742804, | |
| -3.5801800371906, -4.57555064116101, -4.22926388012147, -4.20469261939097, | |
| -4.31131322199477, -4.28741065829903, -4.17024164924144, -4.33729074083249, | |
| -4.93974188355133, -7.14519613499717, -5.01396308418893, -3.75983119008622 | |
| )), row.names = c(NA, -65L), class = "data.frame") | |
| ## works well | |
| m1 <- glmrob(formula = border ~ -1 + zus_log + pol_zus_log, | |
| data = data_for_model, | |
| family = "poisson") | |
| ## fails | |
| m2 <- robmixglm(formula = border ~ -1 + zus_log + pol_zus_log, | |
| data = data_for_model, | |
| family = "poisson") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment