Learn R Programming

MoBPS (version 1.13.1)

creating.phenotypic.transform: Create a phenotypic transformation

Description

Function to perform create a transformation of phenotypes

Usage

creating.phenotypic.transform(
  population,
  phenotypic.transform.function = NULL,
  trait = 1,
  test.h2 = TRUE,
  gen = NULL,
  database = NULL,
  cohorts = NULL,
  h2 = seq(0.05, 0.5, by = 0.05),
  export.h2 = FALSE,
  n.sample = 1000
)

Value

Population-list with a new phenotypic transformation function

Arguments

population

Population list

phenotypic.transform.function

Phenotypic transformation to apply

trait

Trait for which a transformation is to be applied

test.h2

Set to FALSE to not perform heritability check

gen

Quick-insert for database (vector of all generations to export)

database

Groups of individuals to consider for the export

cohorts

Quick-insert for database (vector of names of cohorts to export)

h2

Vector of heritability input to test (before introducing noise from trafo; default: seq(0.05,0.5, by = 0.05))

export.h2

Set TRUE to export matrix of heritability before/after transformation

n.sample

Sample size to use in test.h2 (default: 1000)

Examples

Run this code
data(ex_pop)
trafo <- function(x){return(x^2)}
population <- creating.phenotypic.transform(ex_pop, phenotypic.transform.function=trafo,
n.sample = 100)

Run the code above in your browser using DataLab