calculate_ses: Make up SES (household income) relationship with final height...

Description Usage Arguments Examples

Description

Using the oversampling of "boys", the returned object from "sample_data()"; imputes a made-up linear relationship between fabricated SES variable (think household income) and the final height in column 32 of data_in. In future I will build in params for the 100 and the 12 and the rnorm in teh SES assignment.

Usage

1
calculate_ses(data_in = NULL, slope = 100, intercept = 12)

Arguments

data_in

an object returned from sample_data()

slope

a number that determines the linear relationship of final height and SES. For instance, if slope=100 and intercept=12, then the SES for individual i is SES(i) = 100*( height(i) - minimum of all heights )/(max of all heights - min of all heights) + 12 + rnorm(1)

intercept

a number, see explanation of slope

Examples

1
2
3
4
d<-prep_data()
head(d)
over_samp_mat<-sample_data(d,1000)
with_ses <- calculate_ses(over_samp_mat)

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