Usage
growthCurve(y.case, B, Alpha, Beta, U = NULL, aff.clients = NULL,
W.subj = NULL, X.n = NULL, Z.n = NULL, trt.case, trt.lab, subject.case,
subject.lab, T, min.T, max.T, n.thin, n.waves = NULL, time.case,
n.fix_degree, Nrandom = NULL)
Arguments
y.case
The N x 1 (subject-time case) vector
of data response values.
B
The M x P*q matrix of subject random
effect posterior samples. M = number of MCMC
samples, P = number of subjects, q = number
of random effect parameters, per subject.
Alpha
The M x 1 vector for the model
intercept parameter.
Beta
The M x F matrix of model fixed
effects parameters, where F = number of fixed
effects
U
The M x S matrix of univariate multiple
membership random effects, where S = number of
random effects. U is multivariate, then the input
is of dimension M x Nmv*S, where Nmv is the
aff.clients
Vector of length P.aff that
identifies subjects affected by U. Identical to
subj.aff from dpgrowmm. Input as
list of vectors, each comprised of affected su W.subj
A P x S multiple membership weight
matrix for U that expands W.subj.aff of
dpgrowmm from affected subjects,
Paff to all subjects, P X.n
A design matrix with N rows (for
subject-measure) cases providing nuisance fixed effects.
Will be expanded to the T within sample
predictions, but held constant between successive
observed values (for generating expan
Z.n
A design matrix with N rows providing
nuisance random effects. Grouping is assumed to be
by-subject.
trt.case
The treatment group membership vector of
length N (subject-time cases). Assumed numeric
with lowest group level == 0; .e.g.
(0,0,0,1,1,2,2,2,2,).
trt.lab
Associated labels for the numeric
treatment groups. Each distinct treatment group assumed
to have a unique label.
subject.case
Vector of length N providing
subject-measure cases. Must be in numerical format with
unique subjects sequential starting at 1.
subject.lab
N x 1 case length vector with
user desired labels that map 1:1 to subject.case.
T
Number of time points to build each subject
curve. T = 10 is typically sufficient.
min.T
The minimum time value that T will
take.
max.T
The maximum time value that T will
take.
n.thin
The gap between each MCMC sample used for
the growth curve.
n.waves
The maximum number of observed measurement
waves, per subject.
time.case
A vector of length N providing
times for associated subject-measure observations.
Identical to time from dpgrowmm. n.fix_degree
The highest polynomial degree to
employ for constructing time-based fixed effects
covariates.
Nrandom
A scalar input providing the number of
by-subject time-based random effect parameters. Only need
to input if employ nuisance random effects.