Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

id column in hlm_resid() error #10

Open
aloy opened this issue Jan 26, 2021 · 0 comments
Open

id column in hlm_resid() error #10

aloy opened this issue Jan 26, 2021 · 0 comments
Labels

Comments

@aloy
Copy link
Owner

aloy commented Jan 26, 2021

We should allow for a column to be called "id" or check for this before creating the return object.

alcohol <- read.csv("https://raw.githubusercontent.com/proback/BeyondMLR/master/data/alcohol.csv")
library(HLMdiag)
#> 
#> Attaching package: 'HLMdiag'
#> The following object is masked from 'package:stats':
#> 
#>     covratio
library(lme4)
#> Loading required package: Matrix
fit <- lmer(alcuse ~ age + (1|id), alcohol)
hlm_resid(fit)
#> Error: Column name `id` must not be duplicated.
@aloy aloy added the bug label Jan 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant