Skip to content

Fix bug in resids() function for vglm models with link = "logit" #39

@riccim94

Description

@riccim94

There is an error when resids() function is applied to a vglm cumulative model with link = "logit" when the method is set to "latent" :
Error in if ([dist.name](http://dist.name/) == "norm") { : argument has length 0

The origin of the issue is related to the internal function sure:::getDistributionName.vglm which has this brief code:

function (object)
{
    switch(object@family@infos()$link, logit = "logis", probit = "norm",
        loglog = "gumbel", cloglog = "Gumbel", cauchit = "cauchy")
}

The problem is that now vglm object with logit link function saves it with a "logitlink" string, therefore a possible fix Is proposed

function (object)
{
    switch(object@family@infos()$link, logitlink = "logis", probit = "norm",
        loglog = "gumbel", cloglog = "Gumbel", cauchit = "cauchy")
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions