which worked fine. The former chunk of code interpreted the id argument as the first column of the data (the outcome variable), whereas Meng wanted it to mean that all IDs in this data set were 1.
I propose we could have the id argument do a bit of interpretation.
if(length(id) == 1 && is.character(id)) # id is the name of a column
if(length(id) == 1 && is.numeric(id)) # id is a single ID number
if(length(id) == nrow(observed)) # id is the ID associated with each row
@meng-chen-2013 had an issue related to the difference between
which gave insane results and
which worked fine. The former chunk of code interpreted the
id
argument as the first column of the data (the outcome variable), whereas Meng wanted it to mean that all IDs in this data set were 1.I propose we could have the
id
argument do a bit of interpretation.