R/generate_individuals.r
make_phen.Rd
I need a function that takes some variables, and an effect size for each of them, and this creates a new variable where y = Xb + e, where X is the matrix of independent variables, b is their effect sizes, and e is a noise term. By default it's easier if b relates to the variance explained by each vector in X, and e has variance of 1 - sum(b).
An array of effect sizes that the variables in indep have on the variable that you are simulating
A matrix of variables, rows = Samples and columns = variables that have an influence on the variable that you are simulating
What variance the output should have. Default = 1, meaning effs relate to the signed rsq of the influence of the indep variables on the outcome
What variance the indep variables should have. Default is to set to 1, meaning that the effects are the signed variance explained
mean value of y to be output
Vector of y values