trt_position: Starting and ending position in a vector

Description Usage Arguments Examples

View source: R/functions.R

Description

Function trt_position() gives the starting and ending index of covariate values in the i1th group if all the covariate values from all treatment groups are together in a vector. E.g., covariate values in group 1 start from 1st value to the n1 th value; those in group 2 start from n1+1 and end at (n1+n2)th value. This function is for retrieving the position of an observations when the covariate values from all treatments are stored together in one vector.

Usage

1
trt_position(i1, n)

Arguments

i1

an integer between 1 and length(n).

n

the vector of sample sizes.

Examples

1
i = 2; n=c(7, 8); trt_position(i, n)

PSSIM documentation built on Sept. 13, 2020, 5:18 p.m.

Related to trt_position in PSSIM...