Description Usage Arguments Value

Restructure wide form data into analyzable data, sorted by outcome.

1 2 |

`doubleentered` |
Describes whether data are double entered. Default is FALSE. |

`outcome` |
Name of outcome variable |

`predictors` |
Names of predictors. Default is to use all variables in |

`sep` |
The character in |

`scale` |
If TRUE, rescale all variables at the individual level to have a mean of 0 and a SD of 1. |

`df` |
Dataframe with all variables in it. |

`id` |
id variable (optional). |

`full` |
If TRUE, returns kin1 and kin2 scores in addition to diff and mean scores. If FALSE, only returns diff and mean scores. |

Returns `data.frame`

with the following variables:

`id` |
id |

`outcome_1` |
outcome for kin1; kin1 is always greater than kin2, except when tied. Then kin1 is randomly selected from the pair |

`outcome_2` |
outcome for kin2 |

`outcome_diff` |
difference between outcome of kin1 and kin2 |

`outcome_mean` |
mean outcome for kin1 and kin2 |

`predictor_i_1` |
predictor variable i for kin1 |

`predictor_i_2` |
predictor variable i for kin2 |

`predictor_i_diff` |
difference between predictor i of kin1 and kin2 |

`predictor_i_mean` |
mean predictor i for kin1 and kin2 |

discord documentation built on May 29, 2017, 9:06 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.