Description Usage Arguments Value Examples
View source: R/multi_stage_nonpara_estimation.R
Multi-Stage Nonparametric Procedure
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | sim.nonpara(
n = 80,
model = "arctan",
dist = "normal",
k1 = 10,
k2 = 10,
num.interp = 50,
newl = 50,
eps.sd = 0.05,
mean.diff = 1,
tolerance = 0.009,
itermax = 20,
iter = 0,
time.length = 20,
dat = outdat
)
|
n |
number of sample size. |
model |
a character string for a nonlinear model: |
dist |
a character string for the distribution of within-subject error term in the longitudinal model. Default is |
k1 |
a parameter for the dimension of the basis functions in order to represent the monotone increasing and convex smooth function. |
k2 |
a parameter for the dimension of the basis functions in order to represent the monotone increasing and concave smooth function. |
num.interp |
number of pseudo-data points, which are unifromly generated within the observed data points. |
newl |
a length of time points (log transformed ages) at which predictors are required for each individual longitudinal trajectory. |
eps.sd |
a true scale parameter of the within-subject error term in the longitudinal model. |
mean.diff |
an initial tolerence for the convergence criterion. Default is 1. |
tolerance |
a parameter for the tolerence for the convergence criterion. Default is 0.009. |
itermax |
a parameter for the maximum number of iterations in the multi-stage nonparametric algorithm. Default is 50. |
iter |
initial number of iteration in the multi-stage nonparametric algorithm. The default is 0. |
time.length |
a length of time points for each individual longitudinal trajectory graph to be plotted, should be less than |
dat |
a data frame of the generated data set. |
A list of the simulation results includes
true_za n-length of the true individual inflection points vector.
zstar0a n-length of the estimated initial individual inflection points vector.
zstara n-length of the estimated individual inflection points vector.
indvidual.Taa n-length of estimated individual inflection points vector after all trajectories were shifted by their inflection points.
newlogSa newl-length of the new time points vector at which predictors are required for all subjects.
tms.preda newl-length of the predcited longitudinal trajectory corresponding newlogS
from all subjects' longitudinal data.
tms.se.preda newl-length of the estimated standard errors for tms.pred
.
global.Testimated inflection point on the shifted time points for all subjects.
est.sigma.epsian estimated scale parameter of the within-subject error in the longitudinal model.
ind.b.sda n-length of the boostrap standard deviations vector of zstar
, where each component is the bootstrap standard deviaion of the estimated inflection point for each subject.
ind.est.cpA n x 2 95% bootstrap confidence intervals matrix for zstar
, i.e., each row has the lower bound and the upper bound of the 95% bootstrap confidence intervals for each individual's estimated inflection point.
est.beta0estimated intercept parameter of the log-normal model for the inflection point.
str.beta0estimated standard error of est.beta0
.
est.betaa (p-1)-length of estimated coefficient vector of subject specific covariates in the log-normal model for the inflection point.
str.betaa (p-1)-length of vector with the estimated standard errors of est.beta
.
est.sigma.eian estimated scale parameter of the random error in the log-normal model for the inflection point.
xx.timeA time.length x n time points matrix, where each column is a subset of the each column of newdlogS
, i.e., the individual time points at which estimated numerical derivatives are required for each subject.
ind.org.tmsA time.length x n true longitudinal trajectories matrix, where each column is the true individual longitudinal trajectory at each column of xx.time
for each subject.
ind.est.tmsA time.length x n estimated longitudinal trajectories matrix, where each column is the subset of ind.predict.tms
, i.e., estimated individual longitudinal trajectory at each column of xx.time
for each subject.
trueD1A time.length x n numerically estimated first derivatives matrix of ind.org.tms
, where each column is the numerically estimated first derivative of each column of ind.org.tms
at each column of xx.time
for each subject.
trueD2A time.length x n numerically estimated second derivatives matrix of ind.org.tms
, where each column is the numerically estimated second derivative of each column of ind.org.tms
at each column of xx.time
for each subject.
predD1A time.length x n numerically estimated first derivatives matrix of ind.est.tms
, where each column is the numerically estimated first derivative of each column of ind.est.tms
at each column of xx.time
for each subject.
predD2A time.length x n numerically estimated second derivatives matrix of ind.est.tms
, where each column is the numerically estimated second derivative of each column of ind.est.tms
at each column of xx.time
for each subject.
iternumber of interations until convergence.
mean.diffestimated convergence criterion, which is less than a tolerance
if the algorithm convergences.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | library(HDChangePoint)
# How to Generate Simulated Data using mydata() #
n=80; model="logist"; p=2; bb0=0.5;bb=0.1; x.sd=0.3; v1=8; v2=10;
dist="normal"; eps.sd=0.05;u.sd=0.05;
## Specify parameters for the multi-stage nonparametric procedure
num.interp=45;newl=45; k1=20; k2=20; tolerance=0.009; iter=0; time.length=20;
set.seed(22)
## Data generation under the logistic model
outdat<-mydata(n=n, model=model, p=p, bb0=bb0, bb=bb, x.sd=x.sd,
dist=dist,v1=v1, v2=v2, eps.sd=eps.sd, u.sd=u.sd) #
## Multi-stage nonparametric estimation
results<-sim.nonpara(n=n, model=model, dist=dist, k1=k1, k2=k2,
num.interp=num.interp, newl=newl, eps.sd=eps.sd, mean.diff=1, tolerance=tolerance,
itermax=50, iter=iter, time.length=time.length, dat=outdat)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.