Skip to content

Path towards GLMs with fweights, pweights, and aweights #186

@jeffwong

Description

@jeffwong

This ticket is related to this discourse discussion

From what I can tell

  1. We need to expand LmResp and GLMResp to not only contain wts, but also contain fweights, pweights, and aweights. We should allow a user to pass in multiple types of weights like both fweights and pweights.

  2. We will need to have a function that consolidates fweights, pweights, and aweights into a single vector that can be used in a more classic setting like weighted maximum likelihood. In MLE, only the relative weighting of the weights matter, not the absolute value. If someone is combining fweights and pweights I think this can be consolidated through wts = fweights * pweights. Second opinion welcome here!

  3. The MLE functions already accommodate a weight vector, so nothing needs to be done here if 2) is done

  4. The nobs function currently returns the sum of wts, if present. This is the right behavior for fweights. For pweights and aweights, I think we need to return the number of rows in the LinPred object.

  5. We will need to adapt the vcov function to return the covariance matrix according to the types of weights used. Here is a reference

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions