-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcheck_sibling_order_ram.Rd
More file actions
31 lines (28 loc) · 1.15 KB
/
check_sibling_order_ram.Rd
File metadata and controls
31 lines (28 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/helpers_regression.R
\name{check_sibling_order_ram}
\alias{check_sibling_order_ram}
\title{Check Sibling Order RAM Optimized}
\usage{
check_sibling_order_ram(data, outcome, pair_identifiers, row)
}
\arguments{
\item{data}{The data set with kinship pairs}
\item{outcome}{A character string containing the outcome variable of
interest.}
\item{pair_identifiers}{A character vector of length two that contains the
variable identifier for each kinship pair. Default is c("_s1","_s2").}
\item{row}{The row number of the data frame}
}
\value{
A one-row data frame with a new column order indicating which familial member (1, 2, or
neither) has more of the outcome.
}
\description{
This function determines the order of sibling pairs based on an outcome variable.
The function checks which of the two kinship pairs has more of a specified outcome variable.
It adds a new column named `order` to the dataset, indicating which sibling
(identified as "s1" or "s2") has more of the outcome.
If the two siblings have the same amount of the outcome, it randomly assigns one as having more.
}
\keyword{internal}