fitOneTheta: Fit the maximum likelihood estimate of the parameters for a...

Description Usage Arguments Value Functions

View source: R/oneThetaModel.R

Description

Fit the maximum likelihood estimate of the parameters for a specific EVE model

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
fitSharedBeta(sharedBeta, tree, gene.data,
  colSpecies = colnames(gene.data), extra.var = NULL,
  lowerBound = c(theta = -99, sigma2 = 1e-04, alpha = 0.001),
  upperBound = c(theta = 99, sigma2 = 9999, alpha = 999),
  logTransPars = c("alpha", "sigma2", "beta"), cores = 1, fork = F)

fitOneTheta(tree, gene.data, colSpecies = colnames(gene.data),
  extra.var = NULL, lowerBound = c(theta = -99, sigma2 = 1e-04, alpha =
  0.001, beta = 0.001), upperBound = c(theta = 99, sigma2 = 9999, alpha =
  999, beta = 99), logTransPars = c("alpha", "sigma2", "beta"),
  cores = 1, fork = F)

fitTwoTheta(tree, gene.data, isTheta2edge,
  colSpecies = colnames(gene.data), extra.var = NULL,
  lowerBound = c(theta1 = -99, theta2 = -99, sigma2 = 1e-04, alpha =
  0.001, beta = 0.001), upperBound = c(theta1 = 99, theta2 = 99, sigma2 =
  9999, alpha = 999, beta = 99), logTransPars = c("alpha", "sigma2",
  "beta"), cores = 1, fork = F)

Arguments

sharedBeta

the shared beta parameter

tree

Phylogeny

gene.data

A matrix of expression values with samples in columns and genes in rows

colSpecies

A character vector with same length as columns in returned expression matrix, specifying the species, i.e. tip labels in the phylogeny, for the corresponding column.

extra.var

An optional matrix of technical variance for each expression value. Same dimensions as gene.data (default=NULL)

lowerBound

A named numeric vector of the lower bound for the estimated parameters

upperBound

A named numeric vector of the upper bound for the estimated parameters

logTransPars

A character vector with the names of the parameters that will be log transformed

cores

Number of parallel processes to run

fork

Use forking for parallel execution

isTheta2edge

Logical vector with same length as number of edges in tree specifying whether the corresponding edge theta parameter should be theta2 (TRUE) or theta1 (FALSE)

Value

A list with:

par

A matrix with the parameter estimates

ll

The log likelihood for each estimate

iterations

Number of iterations of the optimisation routine before reaching the estimate

convergence

Error code from the optim function. 0 means convergence.

message

Error message from the optim function.

Functions


Jmendo12/evemodel documentation built on Aug. 29, 2019, 7:25 p.m.