Learn R Programming

MasterBayes (version 2.58)

MLE.beta: Maximum Likelihood Estimation of Beta

Description

Finds MLE for beta given a pedigree, via a call to optim. Beta is the paramater vector of a multinomial log-linear model.

Usage

MLE.beta(X.list, ped, beta=NULL, nUSdam=NULL, nUSsire=NULL, shrink=NULL)

Arguments

X.list

list of design matrices for each offspring derived using getXlist

ped

pedigree with id, dam and sire in ech column

beta

optional starting vector for beta

nUSdam

optional number of unsampled females. Only required if unsampled females have known phenotype.

nUSsire

optional number of unsampled males. Only required if unsampled males have known phenotype.

shrink

optional scalar for the variance defining the ridge-regression likelihood penalisation.

Value

beta

vector of MLE's for beta

C

large sample variance-covariance matrix of beta MLE's

References

Hadfield J.D. et al (2006) Molecular Ecology 15 3715-31 Smouse P.E. et al (1999) Journal of Evolutionary Biology 12 1069-1077

See Also

MCMCped, beta.loglik

Examples

Run this code
# NOT RUN {
data(WarblerP)
data(WarblerG)

GdP<-GdataPed(WarblerG)

res1<-expression(varPed("offspring", restrict=0))
var1<-expression(varPed(c("lat", "long"), gender="Male", 
  relational="OFFSPRING"))
res2<-expression(varPed("terr", gender="Female", relational="OFFSPRING",
  restrict="=="))

PdP<-PdataPed(formula=list(var1,res1,res2), data=WarblerP, USsire=FALSE)

X.list<-getXlist(PdP=PdP, GdP=GdP, E2=0.005)

ped<-MLE.ped(X.list)$P
beta<-MLE.beta(X.list, ped) 
beta
# }

Run the code above in your browser using DataLab