calculate_wtd_trajectories_hh2: Calculate the ST-STIPW based on for graphical viewing as well...

Description Usage Arguments Value Examples

Description

Takes a calculate_stipw(,na.action="omit") object and calculates the weighted trajectories where the weights are standardized (within observation time) STIPWs so that the (regular, unweighted) mean of the weighted trajectories is the same as the weighted mean of the original trajectories. Names are hard coded, so stick to script in the examples.

Usage

1

Arguments

data_in

an object returned from calculate_stipw()

Value

a dataset similar to data_in with stipw in columns; and potentially fewer rows or NA-filled rows for induced censoring.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
d<-prep_data()
head(d)
over_samp_mat<-sample_data(d,1000)
with_ses <- calculate_ses(over_samp_mat)
long <-make_long(with_ses)
head(long)
censored <- apply_censoring(long)
head(censored,18)
observed_with_stipw <- calculate_stipw(censored,"omit")
wtd_trajectories <- calculate_wtd_trajectories(observed_with_stipw)
head(wtd_trajectories)

swihart/wfpca documentation built on May 30, 2019, 10:38 p.m.