Skip to content

make it possible to fit a model without an intercept #51

@mebrooks

Description

@mebrooks

Reproducible example:

> dat = data.frame(prop = runif(100, min=0.45, max=0.55), length=1:100, total=40)
> m0 = selfisher(prop~1, total=total, dat)
> m00 = selfisher(prop~0, total=total, dat)
Error in rep(0, ncol(Xr) - 1) : invalid 'times' argument
> traceback()
6: eval(substitute(expr), data, enclos = parent.frame())
5: eval(substitute(expr), data, enclos = parent.frame())
4: with.default(data.tmb, c(interceptinit(link_char), rep(0, ncol(Xr) - 
       1)))
3: with(data.tmb, c(interceptinit(link_char), rep(0, ncol(Xr) - 
       1)))
2: mkTMBStruc(rformula = rformula, pformula = pformula, dformula = dformula, 
       combForm = combForm, mf = mf, fr = fr, yobs = y, total = total, 
       qratio = qratio, family = familyStr, link_char = link, psplit = psplit, 
       start = start, Lp = Lp, call = call, respCol = respCol)
1: selfisher(prop ~ 0, total = total, dat)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions