estimcov: Estimation of simulation parameters

Description Usage Arguments Details Value Source Examples

View source: R/estimcov.r

Description

estimcov estimates the covariance matrix and dropout rates given a dataset and observation-times

Usage

1
2
3
4
5
6
7
8
9
estimcov(
  data,
  Time,
  Startvalues = c(3, 0.5, 1),
  stepwidth = c(0.001, 0.001, 0.001),
  maxiter = 10000,
  lower = c(1e-04, 1e-04, 1e-04),
  upper = c(Inf, 5, 3)
)

Arguments

data

matrix with the dataset which is used to estimate the covariance and dropout structure.

Time

vector with observation-times.

Startvalues

vector with starting values for variance, rho and theta respectively.

stepwidth

vector describing the step length of previously mentioned values.

maxiter

maximum amount of iterations

lower

vector with minimum for the parameters described in Startvalues

upper

vector with maximum for the parameters described in Startvalues

Details

This function is designed to estimate the variance, rho and theta and a vector with the dropout rate in the data.

Value

estimcov returns a list with two entries. In the first the parameters variance, rho and theta are returned and in the second a vector with the dropout-rate is returned.

Source

estimcov uses code contributed by Roland Gerard Gera.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# First generate a dataset with 200 patients, rho =0.25 and tau = 0.5 and
# then estimate the parameters using estimcov.

set.seed(2015)
dataset <- r.gee.1subgroup(n=200, reg=list(c(0,0,0,0.1),c(0,0,0,0.1)), sigma=c(3,2.5),
  tau=0.5, rho=0.25, theta=1, k=1.5, Time=c(0:5), OD=0)

estimations <- estimcov(data=dataset,Time=c(0:5))
estimations[[1]]
estimations[[2]]

spass documentation built on Jan. 13, 2021, 7:57 p.m.

Related to estimcov in spass...