# Why is rxGlm not returning the same std. Error results as glm? • ### Question

• The sample problem below produces the same parameters estimates when using rxGlm when compared to the glm results.  However, the std. errors are not the same.  Each rxGlm std. Error is roughly equal to the corresponding glm std. Error divided by 169.6.  For example, for the Factor11 level we have that 0.4911 = 0.002895 * 169.6.  Has anyone run into this before? Are there any solutions/workaround?

Sample code:

basictestdata <- data.frame(
Factor1 = as.factor(c(1,1,1,1,2,2,2,2)),
Factor2 = as.factor(c(1,1,2,2,1,1,2,2)),
Discount = c(1,2,1,2,1,2,1,2),
Exposure = c(24000, 40000, 7000, 14000, 7500, 15000, 2000, 5600),
PurePrem = c(46,32,73,58,48,25,220,30))

GLM.1 <- glm(PurePrem ~ Factor1 * Factor2 - 1,
family = tweedie(var.power = 1.5, link.power = 0),
data = basictestdata, weights = Exposure
, offset = log(Discount))

rxGlm.1 <- rxGlm(PurePrem ~ Factor1 * Factor2 - 1 + offset(log(Discount)),
family = rxTweedie(var.power = 1.5, link.power = 0),
data = basictestdata, fweights = "Exposure", dropFirst = TRUE, dropMain = FALSE)

summary(GLM.1)

```
Call:
glm(formula = PurePrem ~ Factor1 * Factor2 - 1, family = tweedie(var.power = 1.5,
link.power = 0), data = basictestdata, weights = Exposure,
offset = log(Discount))

Deviance Residuals:
1       2       3       4       5       6       7       8
248.0  -211.5   144.6  -109.1   181.4  -152.5   239.2  -236.0

Coefficients:
Estimate Std. Error t value Pr(>|t|)
Factor11            3.2163     0.4911   6.550  0.00281 **
Factor12            3.0807     0.8510   3.620  0.02235 *
Factor22            0.4848     0.9001   0.539  0.61872
Factor12:Factor22   0.4658     1.6845   0.277  0.79584 ```

summary(rxGlm.1)

```Call:
rxGlm(formula = PurePrem ~ Factor1 * Factor2 - 1 + offset(log(Discount)),
data = basictestdata, family = rxTweedie(var.power = 1.5,
link.power = 0), fweights = "Exposure", dropFirst = TRUE,
dropMain = FALSE)

Generalized Linear Model Results for: PurePrem ~ Factor1 * Factor2 - 1 +
offset(log(Discount))
Data: basictestdata
Frequency weights: Exposure
Dependent variable(s): PurePrem
Total independent variables: 8 (Including number dropped: 4)
Sum of weights of valid observations: 115100
Number of missing observations: 0

Residual deviance: 308133.9264 (on 115096 degrees of freedom)

Coefficients:
Estimate Std. Error t value Pr(>|t|)
Factor1=1            3.216332   0.002895 1111.00 2.22e-16 ***
Factor1=2            3.080659   0.005017  614.08 2.22e-16 ***
Factor2=1             Dropped    Dropped Dropped  Dropped
Factor2=2            0.484796   0.005306   91.37 2.22e-16 ***
Factor1=1, Factor2=1  Dropped    Dropped Dropped  Dropped
Factor1=2, Factor2=1  Dropped    Dropped Dropped  Dropped
Factor1=1, Factor2=2  Dropped    Dropped Dropped  Dropped
Factor1=2, Factor2=2 0.465814   0.009930   46.91 2.22e-16 ***```

Sunday, March 12, 2017 4:31 AM