MUFASA Workflow Example"

Load Package


Modeling Inputs

Prior to starting make sure that:

Fatty Acid Set

fa.set = as.vector(unlist(FAset))

Matrix of Predator FA Signatures

data(predatorFAs) = predatorFAs[,1:4]
predator.matrix = predatorFAs[,5:(ncol(predatorFAs))]
npredators = nrow(predator.matrix)

Matrix of Prey FA Signatures

prey.matrix = preyFAs[,-c(1,3)]

# Selecting 5 prey species to include <-c("capelin", "herring", "mackerel", "pilchard", "sandlance") <- sort( <- prey.matrix %>%
  filter(Species %in%

Prey Lipid Content (Fat Content)

FC = preyFAs[,c(2,3)] 
FC = FC %>%
FC.vec = tapply(FC$lipid,FC$Species,mean,na.rm=TRUE) <- FC.vec[]

Calibration Coefficients

cal.vec = CC[,2]
cal.m = replicate(npredators, cal.vec)
rownames(cal.m) <- CC$FA

Running MUFASA

M <- p.MUFASA(predator.matrix,, cal.m,, fa.set)

p.MUFASA Output

The MUFASA output is a list with 3 components:

Diet Estimates

This is a matrix of the diet estimate for each predator (by rows, in the same order as the input file) by the species groups (by column, in the same order as the file). The estimates are expressed as a proportion (they will sum to 1).

````r Diet_Estimates <- M$Diet_Estimates

#### nll

This is a vector of the negative log likelihood values at each iteration of the 

nll <- M$nll


This is the optimized diagonal values of the variance-covariance matrix of the errors. See reference in help file for details.

VarEps <- M$Var_Epsilon

Try the QFASA package in your browser

Any scripts or data that you put into this service are public.

QFASA documentation built on July 21, 2021, 1:06 a.m.