Skip to content

'strata(match.id)' is not a factor warning message #1

@bethatkinson

Description

@bethatkinson

I need to get some attributable risk estimates in R, and am getting a warning that I don’t understand. I don’t get the warning if I run it without the baseline statement, so it must have something to do with that piece. Is this a warning I can ignore, or is there something I need to fix here? Thanks!

Jill

temp25 <-attribrisk(hf~expos(htn)+cad+arr+lip+str+art+ast+can+ckd+cpd+dem+dep+dia+ost+szo+sub+anx+strata(match.id), data=all, baseline=b25)
Warning message:
In model.frame.default(tform, data = baseline, xlev = xlevels, na.action = function(x) x) :
variable 'strata(match.id)' is not a factor
is.factor(all$match.id)
[1] TRUE
is.factor(b25$match.id)
[1] TRUE
temp25
Call:
attribrisk(formula = hf ~ expos(htn) + cad + arr + lip + str +
art + ast + can + ckd + cpd + dem + dep + dia + ost + szo +
sub + anx + strata(match.id), data = all, baseline = b25)

n = 5286
coefficient std. err lower 0.95 upper 0.95
attributable risk 0.07230469 0.01372904 0.09921312 0.04539626

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions