Skip to content

Specifying a range in the lookback #8

@jeremysze

Description

@jeremysze

My panel data is not fully balanced and I wanted to select controls in the lookback between 1 to 6 months. So I was trying to specify a range in the look back and the reduce_data function appears to work. However, I was wondering if this is a functionality that was designed into your function?

reduced_data <- reduce_data(data = rem_data, treat = "treat",
                            tm = "BMI_time", entry = "entry_m_time",
                            id = "newid", lookback = c(1:6))

The function worked but I have this warning:

Warning message in if ((lookback == floor(lookback)) == FALSE) {:
"the condition has length > 1 and only the first element will be used"

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