Learn R Programming

pssm (version 1.1.1)

pssm.power: A function to calculate the power for pssm

Description

This function calculates the power, the sample size required for a given power, or the value of the parameter(delta) for a given sample size and power for testing for treatment effect on time to progression and for test for non-inferiority in terms of the survival at a fixed time point

Usage

pssm.power(parameter=c("N","Delta","Power","Power-Simulation"),
endpoint=c("Progression","Survival"),progression.delta=0.2 ,nsamp=100,alpha=0.025,
pow=0.80,tsurv=3,h0=0,prior.surv=0,alloc=c(1,1),phaz=log(.2),shaz=log(.2),accrual=3,
followup=2,inc=0.05,delta=0,intervals=1,nsims=500,n=5000,seed=NULL)

Arguments

parameter

A character vector of parameters to be calculated. For "N", "Delta" and "Power" the calculation proceeds by first calculating the standard error of the parameter measuring the treatment effect in a trial with n (default 3000) patients it then multiplies by the square root of n to get the proper factor to calculate the parameter called for. For "Power-Simulation" it runs a simulation to calculate the power for a specified sample size nsamp and progression.delta. This was included as a check on the asymptotics which is the basis of using one simulation to get a standard error and then scaling up or down to calculate the sample size or detectable difference.

endpoint

A character vector with either "Progression" or "Survival". In the first case it assumes that endpoint for which the sample size is being calculated is the parameter measuring the effect of treatment on the time to progression, which is log of the hazard ratio of placebo to active treatment. In the second it is the difference in the survival curves at the time tsurv

progression.delta

The log of the hazard ratio of placebo to active treatment. This used to calculate the sample size "N" and "Power". When Survival is the endpoint it is used to calculate the survival difference due to the effect of time to progression on overall survival.

nsamp

This is the sample size used to calculate "Power" or "Delta".

alpha

The one sided significance level to be used.

pow

The power required. This is used in the calculation of "N" and "Delta".

tsurv

The time used for the survival difference.

h0

The non-inferiority boundary for the survival difference given as a positive number.

prior.surv

The prior precision of the parameter that measures the effect of treatment on survival after progression. Note that this is \(1/\sigma^2\) where \(\sigma\) is the prior standard deviation of this parameter.

alloc

Allocation between control and treatment group c(1,1) is one to one allocation.

phaz

Log hazard of progression in the placebo group

shaz

Log hazard of survival after progression in the placebo and treatment group

accrual

Accrual period

followup

Follow up period.

inc

Time period between visits for acessing progression.

delta

Variation around visit times

intervals

Number of intervals to fit hazards

nsims

Number of simulations

n

Sample size used to estimate the standard Error.

seed

Seed for the random number generator if you don't want the data that is analyzed to change.

Value

A data frame is returned with variables, "parameter", "endpoint" and "value".

See Also

pssm-class, pssm-package, pssm.generate.data, pssm.object, pssm, pssm.simulate, pssm.survivalcurv, plot-methods

Examples

Run this code
# NOT RUN {
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.
pssm.power(parameter="Power",progression.delta=.4,nsamp=450,h0=0.04,nsims=100)
# }

Run the code above in your browser using DataLab