conditionedProp: Compute Conditioned Proportions for UPs

View source: R/conditionedProp.R

conditionedPropR Documentation

Compute Conditioned Proportions for UPs

Description

This function calculates the conditioned proportions for pigmentation traits for UP, when UP is MP. It considers error rates for observations of hair color, skin color, and eye color.

Usage

conditionedProp(data, h, s, y, eh, es, ey)

Arguments

data

A data.frame containing the characteristics of UPs.

h

An integer representing the MP's hair color.

s

An integer representing the MP's skin color.

y

An integer representing the MP's eye color.

eh

A numeric value representing the error rate for observing hair color.

es

A numeric value representing the error rate for observing skin color.

ey

A numeric value representing the error rate for observing eye color.

Value

A numeric vector containing the conditioned proportion (numerator) for each individual in the dataset. These values are calculated based on the probability of observing the given combination of characteristics in the MP, compared to each UP.


mispitools documentation built on Sept. 11, 2024, 8:29 p.m.