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 logistic model, the parametric NLME procedure is performed under the correct logistic model.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | main.logist.nlme(
n = 80,
model = "logist",
dat = outdat,
num.boot = 1000,
true.theta1 = 1,
true.theta3 = 6,
time.length = 20,
eps.sd = 0.05,
dist = "normal",
para1 = 3.5,
para2 = 0.1,
para3 = 0.1,
para4 = 1
)
|
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. |
true.theta1 |
a true parameter for |
true.theta3 |
a true parameter for |
time.length |
number of data points at which predictors are required for each individual longitudinal trajectory. This time point for graphs to be plotted. |
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 |
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 |
A list of
est.theta1estimated fixed effect parameter for theta1
, see logistft()
.
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.theta3estimated fixed effect parameter for theta3
, see logistft()
.
est.str.theta1estimated standard error of theta1
.
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.theta3estimated standard error of theta3
.
cp.lower.theta1estimated lower bound of the 95% confidence interval for theta1
.
cp.upper.theta1estimated upper bound of the 95% confidence interval for theta1
.
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.theta3estimated lower bound of the 95% confidence interval for theta3
.
cp.upper.theta3estimated upper bound of the 95% confidence interval for theta3
.
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.lengthx 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 | library(HDChangePoint)
## Specify parameters to generate true data
n=80;
model="logist";
p=2;
bb0=0.5;
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.theta1=6;
true.theta3=1;
time.length=20;
eps.sd=0.05;
dist="normal";
para1=4.8;
para2=4.6;
para3=0;
para4=1;
## Do parametric NLME estimation
results<-main.logist.nlme(n=n, model=model, dat=outdat, num.boot=num.boot,
true.theta1=true.theta1, true.theta3=true.theta3, time.length=time.length, eps.sd=eps.sd, dist=dist,
para1=para1, para2=para2, para3=para3, para4=para4)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.