main.arctan.nlme: Parametric nonlinear mixed effects model (NLME) approach:...

Description Usage Arguments Value Examples

View source: R/paraNLME_estimation.R

Description

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.

Usage

 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"
)

Arguments

n

number of sample size.

model

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

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 gam1 in the arctangent model, see arctanf().

true.gam3

a true parameter for gam3, which determines steepness of the arctangent model, see arctanf().

para1

an initial parameter for gam1, which is used for the parametric nonlinear mixed effects model (NLME) approach.

para2

an initial intercept parameter for the inflection point gam2, which is used for the parametric nonlinear mixed effects model (NLME) approach.

para3

an initial (p-1)-length of coefficient vector of subject specific covariates for the inflection point gam2, which is used for the parametric nonlinear mixed effects model (NLME) approach.

para4

an initial parameter for gam3, which is used for the parametric nonlinear mixed effects model (NLME) approach.

para5

an initial vertical shift parameter for gam4, which is used for the parametric nonlinear mixed effects model (NLME) approach.

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 "normal".

Value

A list of

Examples

 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)

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