sim.nonpara: Multi-Stage Nonparametric Procedure

Description Usage Arguments Value Examples

View source: R/multi_stage_nonpara_estimation.R

Description

Multi-Stage Nonparametric Procedure

Usage

 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
)

Arguments

n

number of sample size.

model

a character string for a nonlinear model: "logist" or "arctan".

dist

a character string for the distribution of within-subject error term in the longitudinal model. Default is "normal".

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 newl.

dat

a data frame of the generated data set.

Value

A list of the simulation results includes

Examples

 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)

unkyunglee/HDChangePoint documentation built on Nov. 27, 2021, 2:57 p.m.