Create a list of data for parameter estimation (cooking dynr) using dynr.cook

Description

Create a list of data for parameter estimation (cooking dynr) using dynr.cook

Usage

1
dynr.data(dataframe, id, time, observed, covariates)

Arguments

dataframe

the data in the format of a data frame in R that contain a column of subject ID numbers (i.e., an ID variable), a column indicating subject-specific measurement occasions (i.e., a TIME variable), at least one column of observed values, and any number of covariates. If the data are fit to a discrete-time model, the TIME variable should contain subject-specific sequences of consecutively equally spaced numbers (e.g, 1, 2, 3, ...). If the data are fit to a continuous-time model, the TIME varibles can contain subject-specific increasing sequences of irregularly spaced real numbers. Missing values in the observed variables shoud be indicated by NA. Missing values in covariates are not allowed. That is, missing values in the covariates, if there are any, should be imputed first.

id

a character string of the name of the ID variable in the data.

time

a character string of the name of the TIME variable in the data.

observed

a vector of character strings of the names of the observed variables in the data.

covariates

a vector of character strings of the names of the covariates in the data, which can be missing.

Examples

1
2
data(EMGsim)
dd <- dynr.data(EMGsim, id='id', time='time', observed='EMG', covariates='self')

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.