help pkshape dialog: pkshape
-------------------------------------------------------------------------------
Title
[R] pkshape -- Reshape (pharmacokinetic) Latin-square data
Syntax
pkshape id sequence period1 period2 [period list] [, options]
options description
-------------------------------------------------------------------------
order(string) apply treatments in specified order
outcome(newvar) name for outcome variable; default is
outcome(outcome)
treatment(newvar) name for treatment variable; default is
treatment(treat)
carryover(newvar) name for carryover variable; default is
carryover(carry)
sequence(newvar) name for sequence variable; default is
sequence(sequence)
period(newvar) name for period variable; default is period(period)
-------------------------------------------------------------------------
Menu
Statistics > Epidemiology and related > Other > Reshape pharmacokinetic
latin-square data
Description
pkshape reshapes the data for use with anova, pkcross, and pkequiv.
Latin-square and crossover data are often organized in a manner that
cannot be analyzed easily with Stata. pkshape reorganizes the data in
memory for use in Stata.
pkshape is one of the pk commands. Please read pk before reading this
entry.
Options
order(string) specifies the order in which treatments were applied. If
the sequence() specifier is a string variable that specifies the
order, this option is not necessary. Otherwise, order() specifies
how to generate the treatment and carryover variables. Any string
variable can be used to specify the order. For crossover designs,
any washout periods can be indicated with the number 0.
outcome(newvar) specifies the name for the outcome variable in the
reorganized data. By default, outcome(outcome) is used.
treatment(newvar) specifies the name for the treatment variable in the
reorganized data. By default, treatment(treat) is used.
carryover(newvar) specifies the name for the carryover variable in the
reorganized data. By default, carryover(carry) is used.
sequence(newvar) specifies the name for the sequence variable in the
reorganized data. By default, sequence(sequence) is used.
period(newvar) specifies the name for the period variable in the
reorganized data. By default, period(period) is used.
Remarks
Often, data from a Latin-square experiment are naturally organized in a
manner that Stata cannot manage easily. pkshape reorganizes Latin-square
data so that they can be used with anova or any pk command. This
reorganization includes the classic 2 x 2 crossover design commonly used
in pharmaceutical research, as well as many other Latin-square designs.
Examples
---------------------------------------------------------------------------
. webuse chowliu
. pkshape id seq period1 period2, order(ab ba)
---------------------------------------------------------------------------
. webuse music, clear
. pkshape id seq day1 day2 day3 day4 day5
. anova outcome seq period treat
---------------------------------------------------------------------------
. webuse applesales, clear
. pkshape id seq p1 p2 p3, order(bca abc cab) seq(pattern) period(order)
treat(displays)
. anova outcome pattern order display id|pattern
---------------------------------------------------------------------------
Also see
Manual: [R] pkshape
Help: [R] pk