3
$\begingroup$

I am using betareg in R to assess the relationship between percentage of time covered with baseline characteristics such as age and sex. The outcome measure is the percentage of time covered (PTC) by a test: each tests cover a participant for 6 months. If a participant had several tests during their time in the study, their total time covered is the sum of all times covered (TC). PTC is TC divided by their total time in the study(TT). Since TT is different between participant; ranging from 6 months to few years, I use weights to give more emphasis on those with longer time in the study. I examined two options for weights: first option is TT and second option is TT/SUM(TT): for each participant their TT divide by the sum of TT for all participants. So essentially second option is first option divided by a constant value (SUM(TT)).

Option 1:

      Call:
       betareg(formula = PTC ~ Sex + Age, data = Test, weights = 
       Test$TT, link = "logit")

      Standardized weighted residuals 2:
        Min       1Q   Median       3Q      Max 
     -10.9333  -3.1518  -0.0751   4.8051  18.9835 

       Coefficients (mean model with logit link):
               Estimate Std. Error z value Pr(>|z|)    
  (Intercept) -0.1771340  0.0281138  -6.301 2.96e-10 ***
  SexFemale   -0.0323812  0.0114639  -2.825  0.00473 ** 
   Age         0.0169218  0.0004632  36.532  < 2e-16 ***

  Phi coefficients (precision model with identity link):
  Estimate Std. Error z value Pr(>|z|)    
  (phi)  1.94438    0.01234   157.5   <2e-16 ***
   ---
     Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 

    Type of estimator: ML (maximum likelihood)
   Log-likelihood: 1.267e+04 on 4 Df
   Pseudo R-squared: 0.01633
   Number of iterations: 17 (BFGS) + 1 (Fisher scoring) 

Option 2:

      Call:
      betareg(formula = PTC ~ Sex + Age, data = Test, weights = 
      Test$TT/T, link = "logit")

     Standardized weighted residuals 2:
       Min      1Q  Median      3Q     Max 
      -0.0548 -0.0158 -0.0004  0.0241  0.0952 

         Coefficients (mean model with logit link):
                Estimate Std. Error z value Pr(>|z|)
    (Intercept) -0.17713    5.60469  -0.032    0.975
    SexFemale   -0.03238    2.28541  -0.014    0.989
    Age          0.01692    0.09234   0.183    0.855

   Phi coefficients (precision model with identity link):
       Estimate   Std. Error z value Pr(>|z|)
 (phi)    1.944      2.461    0.79    0.429

    Type of estimator: ML (maximum likelihood)
   Log-likelihood: 0.3188 on 4 Df
   Pseudo R-squared: 0.01633
   Number of iterations: 28 (BFGS) + 3 (Fisher scoring) 
   Warning message:
   In betareg.fit(X, Y, Z, weights, offset, link, link.phi, type, 
    control) :
    no valid starting value for precision parameter found, using 1 
    instead

Why multiplying weight by a constant make the results so different? Which one is correct?

Edit: I now understand that rescaling weights, rescales variances and therefore p-values. My question now is which option is correct? should I standardise the weights (Option 2)?

$\endgroup$
7
  • 1
    $\begingroup$ Rescaling the weights by a constant (as in option 2, dividing by $SUM(TT)$ changes the magnitude of the weights but does not alter their relative proportions. While the parameter estimates (e.g., regression coefficients) should remain unchanged, the rescaling affects the variance of the parameter estimates and, consequently, the standard errors and p-values. This occurs because the weights influence the effective sample size used to calculate these variances. $\endgroup$ Commented Nov 25 at 18:08
  • 1
    $\begingroup$ Unless there is a specific reason to emphasize the absolute scale of $TT$, using normalized weights (option 2) is often more robust and interpretable in practice. Standardizing weights ensures consistency and comparability, especially if you plan to discuss effect sizes or variances relative to the study population. $\endgroup$ Commented Nov 25 at 18:08
  • $\begingroup$ @StatsStudent Thank you. Should I ignore the warnings at the end of Option 2? As you mentioned the estimations are the same in the two models. Are they interpreted differently? How are they interpreted? $\endgroup$
    – AziR
    Commented Nov 26 at 8:12
  • 1
    $\begingroup$ There is a difference in interpretation between the two models. If you want the model to reflect contributions proportional to the absolute time participants spent in the study, use option 1. If you want weights to represent relative importance within the dataset and do not want the scale of $TT$ to influence the variance, use option 2. Option 2 is statistically more common for weighting schemes as it prevents the overall scale of weights from dominating the variance calculations. (continued). $\endgroup$ Commented Nov 26 at 19:06
  • 1
    $\begingroup$ However, if there is some specific reason to emphasize the absolute scale of $TT$ and you can justify this, then option 1 is fine. Standardizing weights in option 2 ensures consistency and comparability, especially if you plan to discuss effect sizes or variances relative to the study population. $\endgroup$ Commented Nov 26 at 19:07

1 Answer 1

3
$\begingroup$

What you are looking is typically referred to as precision weights. This means that the variance is proportional to the weights and is invariant to rescaling the weights. This is what is implemented in lm() in R.

However, betareg() implements frequency weights (sometimes also called case weights). This means that a weight of $w_i$ is an integer and indicates that there were $w_i$ identical observations that have been compressed into a single row in the data set. Thus, the variance decreases with increasing weights (= more observations) and is not invariant to rescaling.

The point estimates are identical for both definitions of weights but the variance estimates differ. For more details see Weights in Statistics by Thomas Lumley in his blog. (In addition to the two types of weights above, this also adds sampling weights as commonly used in survey data.)

$\endgroup$
3
  • $\begingroup$ Thank you, this is very helpful. Am I correct in understanding that the quasibinomial is the appropriate choice since the outcome is bounded between (0,1] and includes a free dispersion parameter and takes precision weights? Alternatively, I could log-transform the data and use lm() if the normality assumptions are satisfied as lm is easier to interpret. Am I correct? $\endgroup$
    – AziR
    Commented Nov 27 at 6:13
  • $\begingroup$ Worth a try. Hard to predict whether this will yield better or more useful results for your application. That's then for you to decide. $\endgroup$ Commented Nov 27 at 9:20
  • $\begingroup$ apologies for picking this up again! Is quasibinomial appropriate when weights are not integers? I found comments in places that the weights should be the number of trials while I am dealing with length of follow ups (in months) that can take any values. IF so, how does the coefficients of the model, say with logit link, interpreted? $\endgroup$
    – AziR
    Commented Dec 11 at 9:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.