f.primaryEndpointResults: Calculate type of control data collected in a study

View source: R/f_primaryEndpointResults.R

f.primaryEndpointResultsR Documentation

Calculate type of control data collected in a study

Description

Trial concept calculated: Calculates several results-related elements of the primary analysis of the primary endpoint. Requires loading results-related information. For CTIS and ISRCTN, such information is not available in structured format. Recommended to be combined with .controlType, .sampleSize etc. for analyses.

Usage

f.primaryEndpointResults(df = NULL)

Arguments

df

data frame such as from dbGetFieldsIntoDf. If 'NULL', prints fields needed in 'df' for calculating this trial concept, which can be used with dbGetFieldsIntoDf.

Value

data frame with columns '_id' and new columns: '.primaryEndpointFirstPvalue' (discarding any inequality indicator, e.g. <=), '.primaryEndpointFirstPmethod' (normalised string, e.g. chisquared), '.primaryEndpointFirstPsize' (number included in test, across assignment groups).

Examples

# fields needed
f.primaryEndpointResults()

## Not run: 

# apply trial concept when creating data frame
dbc <- nodbi::src_sqlite(
  dbname = system.file("extdata", "demo.sqlite", package = "ctrdata"),
  collection = "my_trials", flags = RSQLite::SQLITE_RO)
trialsDf <- dbGetFieldsIntoDf(
  calculate = "f.primaryEndpointResults",
  con = dbc)

## End(Not run)


ctrdata documentation built on April 3, 2025, 8:12 p.m.