Skip to content

Should we allow non-integer data? #11

@singmann

Description

@singmann

Currently fit_mpt contains the following check (lines 74-82):

# Check whether freqencies are integer ----
 not_integer <- unlist(lapply(X = data[, freq_cols], FUN = function(x) {
     any(as.integer(x)!=x)
   }
 ))
 
 if(any(not_integer)) {
   stop("Variable \"", paste(freq_cols[not_integer], collapse = ", "), "\" contains non-integer values.")
 }

I know that data should usually be integers, but at least MPTinR can work with non-integer values as well. For example, such values can occur if one wants to fit predicted probabilities or when using some correction for zero-cells. As long as TreeBUGS (@danheck ) not has a problem with non-integer data I suggest to downgrade the stop to a warning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions