Description Usage Arguments Value Examples
View source: R/paraNLME_estimation.R
Parametric nonlinear mixed effects model (NLME) approach: When true data are generated by the arctangent model, the parametric NLME procedure is performed under the correct arctangent model.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | main.arctan.nlme(
n = 80,
model = "arctan",
dat = outdat,
num.boot = 1000,
time.length = 20,
true.gam1 = 2.45/pi,
true.gam3 = pi/1.1,
para1 = 0.8,
para2 = 0.2,
para3 = 0.2,
para4 = 2.8,
para5 = 1.5,
eps.sd = 0.05,
dist = "normal"
)
|
n |
number of sample size. |
model |
a character string for a nonlinear model: |
dat |
a data frame of the generated data set. |
num.boot |
number of bootsrap replicates. |
time.length |
number of data points at which predictors are required for each individual longitudinal trajectory. This time point for graphs to be plotted. |
true.gam1 |
a true scale parameter for |
true.gam3 |
a true parameter for |
para1 |
an initial parameter for |
para2 |
an initial intercept parameter for the inflection point |
para3 |
an initial (p-1)-length of coefficient vector of subject specific covariates for the inflection point |
para4 |
an initial parameter for |
para5 |
an initial vertical shift parameter for |
eps.sd |
a true scale parameter of the within-subject error term in the longitudinal model. |
dist |
a character string for the distribution of within-subject error term in the longitudinal model. Default is |
A list of
est.gam1estimated fixed effect parameter for gam1
in the arctangent function, see arctanf()
.
est.betathe (p-1)-length of estimated coefficient vector of subjec-specific covariates in the log-normal model for inflection points.
est.beta0estimated intercept of the log-normal model for inflection points.
est.gam3estimated fixed effect parameter for gam3
in the arctangent function, see arctanf()
.
est.gam4estimated fixed effect parameter for gam4
in the arctangent function, see arctanf()
.
est.str.gam1estimated standard error of gam1
.
est.str.betathe (p-1)-length of estimated standard errors of the coefficient vector of subject-specific covariates in the log-normal model for inflection points.
est.str.beta0estimated standard errors of the intercept of the log-normal model for inflection points.
est.str.gam3estimated standard error of gam3
.
est.str.gam4estimated standard error of gam4
.
cp.lower.gam1estimated lower bound of the 95% confidence interval for gam1
.
cp.upper.gam1estimated upper bound of the 95% confidence interval for gam1
.
cp.lower.beta0estimated lower bound of the 95% confidence interval for beta0, which is the intercept of the log-normal model for inflection points.
cp.upper.beta0estimated upper bound of the 95% confidence interval for beta0, which is the intercept of the log-normal model for inflection points.
cp.lower.betaestimated lower bound of the 95% confidence interval for beta, which is the (p-1)-length of the coefficient vector of subject specific covariates in the log-normal model for inflection points.
cp.upper.betaestimated upper bound of the 95% confidence interval for beta, which is the (p-1)-length of the coefficient vector of subject specific covariates in the log-normal model for inflection points.
cp.lower.gam3estimated lower bound of the 95% confidence interval for gam3
.
cp.upper.gam3estimated upper bound of the 95% confidence interval for gam3
.
cp.lower.gam4estimated lower bound of the 95% confidence interval for gam4
.
cp.upper.gam4estimated upper bound of the 95% confidence interval for gam4
.
est.rand.efestimated random effects in the log normal model for the inflection points.
est.logTthe n-length of the estimated inflection points vector, where each element is the individual estimated inflection point.
true.logTthe n-length of the true inflection points vector, where each element is the true individual inflection point.
new.pred.dataa time.length x 5 x n array of data set to generate boostrap estimates, which includes ID, log scaled ages, subject specfici covariates, true longitudinal trajectories and estimated longitudinal trajectories for each subject.
true.first.deriva time.length x n array of the first derivatives of the true longitudinal trajectories, where each column is the first derivatives of the true longitudinal responses corresponding subject-specific log scaled ages in new.pred.data
for each subject.
true.second.deriva time.length x n array of the second derivatives of the true longitudinal trajectories, where each column is the second derivatives of the true longitudinal responses corresponding subject-specific log scaled ages in new.pred.data
for each subject.
est.first.deriva time.length x n array of the estiamted first derivatives of longitudinal trajectories, where each column is the estimated second derivatives of longitudinal responses corresponding subject-specific log scaled ages in new.pred.data
for each subject.
est.second.deriva time.length x n array of the estiamted second derivatives of longitudinal trajectories, where each column is the estimated second derivatives of longitudinal responses corresponding subject-specific log scaled ages in new.pred.data
for each subject.
boot.est.logTa n x num.boot array of the bootstrap estimated inflection points, where each row is a num.boot-length of boostrap estimates of the inflection point for each subject.
ind.sdthe n-length of the estimated boostrap standard deviations, where each element is the estimated standard deviation of the bootstrap estimates for each subject (each row of boot.est.logT
).
cp.boota n x 2 array of the 95% bootstrap confidence intervals, where each row has the lower bound and the upper bound of the 95% confidence interval for the individual inflection point (i.e., 25th and 97.5th percentiles of the increasing ordered boostrap estimates for each row of boot.est.logT
).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | library(HDChangePoint)
## Specify parameters to generate true data
n=80;
model="arctan";
p=2;
bb0=2;
bb=0.1;
x.sd=0.3;
v1=5;
v2=7;
dist="normal";
eps.sd=0.05;
u.sd=0.05;
## generate data with seed number
set.seed(22)
outdat<-mydata(n=n, model=model, p=p, bb0=bb0, bb=bb, x.sd=x.sd,
v1=v1, v2=v2, dist=dist, eps.sd=eps.sd, u.sd=u.sd)
## Specify parameters for the parametric NLME procedure
num.boot=1000;
true.gam1=2.45/pi;
true.gam3=pi/1.1;
time.length=45;
eps.sd=0.05;
dist="normal";
para1=6.5;
para2=6.3;
para3=0;
para4=2.8;
para5=1.5;
## Do parametric NLME estimation
results<-main.arctan.nlme(n=n, model=model, dat=outdat, num.boot=num.boot, time.length=time.length,
true.gam1=true.gam1, true.gam3=true.gam3, para1=para1, para2=para2, para3=para3,
para4=para4, para5=para5, eps.sd=eps.sd, dist=dist)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.