Negative standard errors

  • Q: I am getting a value of -1.0 as standard error for some of my estimates of genetic parameters, together with a note that Negative values for s.e. indicate failed approximation!. What does is mean and what can I do about it?
  • A: Standard errors in WOMBAT are derived a) assuming large samples, and b) a series of approximations - see the Technical Details section of the manual. In some cases, this approximation simply fails. Reasons for this may be, for instance, that your sample is very small, or that you are dealing with a model which is overparameterised, which includes multivariate analyses where some covariance matrices have eigenvalues which are effectively zero. In the latter scenario, it may help to fit a reduced rank model. Otherwise, you simply have to accept that the approximation of standard errors does not always work.

Message "Small/Invalid Pivot"

  • Q: When I run WOMBAT I often get a message to the screen, saying either small, negative or invalid pivot - What does it mean and what should I do about it?
  • A: All the calculations in WOMBAT assume that the coefficient matrix in the mixed model equations for the model fitted is positive definite. In essence, the coefficient matrix is factored sequentially and the `pivot' is the current diagonal element, adjusting for (or absorbing) all rows and columns already processed. If this quantity is close to zero, we suspect trouble and this can cause an analysis to fail - Hence the warning message. There are several reasons why this may occur and different actions to take.
    1. If your model of analysis contains several, cross-classified fixed effects, we cannot estimate all these effects. WOMBAT automatically accounts for this by setting the solution for the first levels of all fixed effects other than the first to zero. However, there may be additional dependencies among your fixed effects, for example due to some confounding or if an effect is, in fact, nested within the levels of another effect fitted. While WOMBAT does try to find some of these additional dependencies, the mechanism used is not all that reliable and may fail due to numerical inaccuracies, especially for larger data sets.
      Hence, if you get such warning or error message right from the start of the analysis, unidentified dependencies among the fixed effects fitted are most likely the cause. The remedy is to identify these (I know, that's easier said than done) and specify them in the parameter file, using the ZEROUT directive.
    2. In other cases, this warning message will start to appear several iterates into the analysis, most commonly for multivariate or random regression analysis. Usually this is due to a covariance matrix to be estimated which is close to the bounds of the parameter space, i.e. has one or more eigenvalues close to zero. WOMBAT will attempt some damage control and if you are lucky, the analysis will converge anyway, though it may need a few extra iterates. If you ran an analysis where you expect high (absolute value) correlations among traits (or RR coefficients), specifying —-logdia as a run time option may be beneficial. In other cases the analysis fails to converge and you may need to change the maximization algorithm used (try run options —-emalg or —-simplex) or your model and parameterization. For instance, if a covariance matrix pertains to several strongly correlated variables, estimating it at slightly reduced rather than full rank may help convergence and make the warning messages disappear.
    3. In rare cases, invalid pivots reported may be negative (and not close to zero) and WOMBAT usually (but not always) simply stops. As a rule that is indicative of a serious problem with the data or model. For instance, this can occur if you think you have single records per trait and animal but, in reality, have duplicated records or animal codes. If no permanent environmental effects of the individual have been fitted, this can cause serious deviations of the coefficient matrix from its assumed structure and thus wreak havouc. Last but not least, this may be due to a bug in the program - if you have ruled out all other possible causes, please file a bug report.

Crash "Segmentation fault"

  • Q: WOMBAT crashes with a “Segmentation fault” with a heap of unintelligible numbers to follow – this seems to happen quite early on, i.e. during the set-up phase before any likelihoods are printed to the screen. What is wrong?
  • A: A `segmentation fault' message is a run-time error message generated by the FORTRAN compiler. In contrast, the majority of error messages in WOMBAT are programmed in to catch mistakes made by the programs user – you. It usually means that an array has the wrong dimensions, but it can also be a consequence of other `bugs' somewhere else in the program.
    There is a known problem with WOMBAT that it can crash with such error or hang up during the set-up phase when trying to establish the optimum ordering of equations. Fortunately, this is rare – it occurs most often for larger problems and/or when using the MeTiS option, either implicitly (program default for large problems) or explicitly specified, in particular when the model of analysis includes a fixed effect with very few levels or covariables. WOMBAT incorporates three different ordering strategies, all using subroutines available in the public domain. Unfortunately, none of them are totally reliable. In particular, MeTiS can misbehave and does not provide a `graceful' exit when problems occur, i.e. there is no facility to fault-trap this and shut down WOMBAT with an explanatory message.
    So what can you do in this case? Try:
  1. Use a different ordering strategy, i.e. the approximate minimum degree ordering invoked with the −−amd run time option.
  2. Use different options for MeTis, e.g. reduce the number of graph separators considered (option 1), switch from random to standard edge matching (a “3” for the third option), or change from two-sided to one-sided node refinement (a “2” for the fourth option) – see the manual for details.
  3. WOMBAT has a guess at the space required in the set-up phase. Usually, this is quite appropriate and tends to err on the large side. Occasionally, however, it is too small for MeTiS to work properly. So, you could try to give it some extra space using the −−choozhz run time option (this will print out a screen message giving a the default value WOMBAT would use and allow you to type in a different value overriding the default).

Zero residual covariances

  • Q: My multivariate analysis gives `estimates' of residual covariances which are zero, and SumModel.out tells me that WOMBAT thinks that there are no animals which have records for the corresponding pairs of traits – but I know that there are animals which do. Why is WOMBAT so confused ?
  • A: WOMBAT requires the data file to be in a certain order to correctly identify that an individual has multiple records – please check the manual! Perhaps you have forgotten to sort the data file, or the sort did not work properly. Please sort the data file as required and try again – and double-check that SumModel.out gives the correct numbers of individuals with records for each pair of traits before proceeding to the estimation step.
    Another possibility is that you have specified starting values of zero for the residual covariances – this causes WOMBAT not to estimate these values and fix them at their starting values. However, in that case SumModel.out should report numbers of individuals with pairs of records greater than zero.

Interaction for fixed effects

  • Q: I want to fit a model with an interaction between two fixed effects. How do I do that ? The manual says Not Yet implemented – surely, that can't be true ?
  • A: The manual is slightly misleading here: Yes, of course you can fit a model with an interaction. What the manual means is that WOMBAT won't to the relevant coding for you. So what you have to do is:
    1. Generate a code for the interaction from the two fixed effects codes and write this to a new column in your data file. For example, if fixed effect A has a maximum value of 8571 and you want to fit an interaction between fixed effects A and B, the new code could be 10000*code(B)+code(A). In doing so, ensure that your new code is still a valid integer variable, i.e. does not exceed 2,147,483,647.
    2. Fit this new effect as if it were a cross-classified fixed effect.
    3. Check carefully for any dependencies among the fixed effects before running your analysis. If necessary, tell WOMBAT about them using the ZEROUT option. This is particularly important, if you want to fit effects A (or B) in addition to the interaction - you then have the interaction nested in A (or B), i.e. if effect A has a levels, you have (a-1) additional dependencies among the fixed effects. WOMBAT may find some of them, but you cannot rely on it.

Polynomial regression

Adjustment factors

The default form of regression equation in WOMBAT is chosen to account for rank deficiencies in the fixed effects part of the coefficient matrix in the MME when estimating variance components. If your aim is to obtain `adjustment factors' for other analyses, it is best to fit the appropriate model from the start.

  • Intercepts are readily fitted, but may cause additional dependencies among fixed effects, in particular for nested covariables. If so, you will need to identify suitable fixed effects levels to be `zero-ed out' to account for these dependencies, and specify them in the parameter file via the ZEROUT statement.
  • An alternative way to fit a higher order polynomial regression is to include appropriate powers of the covariable as additional columns in the data file and fit these as additional, linear covariables. This will directly yield the βi type regression coefficients.

When fitting a complicated fixed effects model, care is needed in the interpretation of results, paying particular attention to the estimability of individual effects!

  • Q: I am fitting age as a quadratic covariable in the model, using the default polynomial regression. WOMBAT gives me estimates of regression coefficients in FixSolutions.out, but: a) I can't find the intercept, and b) these estimates don't make sense, i.e. when I plug them into the regression equation, I don't get a curve which fits the data. What is wrong?
  • A: When you say “regression equation”, are you thinking of an equation of the form:
    y = β0 + β1 x + β2 x2
    with intercept, linear and quadratic regression coefficients given by β0, β1, and β2, respectively. Correct ? If so, this is the problem:
    1. WOMBAT deviates both records and covariables from their respective means prior to analysis, and then fits an “intercept-free” regression equation of form:
      y - μy = α1 ( x - μx) + α2 ( x - μx)2
    2. This means that you can not use the estimates αi from WOMBAT directly in your regression equation above!
    3. Fortunately, there is a straightforward relationship between the αi coefficients from WOMBAT, and the coefficients βi you want. You need the means, μy and μx, for records and covariables (you find these in file SumModel.out). You can then calculate your coefficients as:
      • β0 = μy - α1 μx + α2 μx2
      • β1 = α1 - 2 α2 μx and
      • β2 = α2.

Categorical traits

  • Q: What options does WOMBAT provide for the analysis of categorical traits – I cannot find anything about it in the manual.
  • A: None – the manual clearly states that WOMBAT is geared towards the analysis of continuous traits (only!), assuming a multivariate normal distribution.

Missing covariables

  • Q: I want to fit a covariable, but there are some records where this is not recorded. What should I do? WOMBAT doesn't seem to allow for a 'missing value' code there, so I have set them all to a value of zero. Is that o.k. ?
  • A: No, it is not! Strictly speaking, you should delete all records for which you don't have the covariable recorded. WOMBAT will not do that for you! Setting 'missing values' to zero will create havouc (unless the mean covariable in the data is zero), as WOMBAT will treat those as observed values and therefore may estimate regression coefficient which don't fit the data at all. In some instances, you may not be willing to delete these records - if you really must retain them, you should set the value for the missing covariable to the mean of the covariable in the data. This would yield an analysis where you adjust some records for the covariable, but not others; hence you should not do this for covariables which have a substantial effect on the variance of your observations.

Missing dam code

  • Q: I am dealing with a trait subject to maternal effects. However, the identity of the dam is not recorded for a lot of animals, and WOMBAT won't let me run an analysis fitting maternal effects if the data contain dam codes of zero. What can I do to analyse this trait properly?
  • A: Sadly, WOMBAT cannot generate information out of nothing, i.e. in order to estimate an effect you need to record it. You could:
    1. Fit a sire instead of an animal model. This should at least give you an estimate of the additive genetic variance unbiased by maternal effects.
    2. Fit an animal model for the subset of the data which do have known dams, i.e. delete all records on animals with unidentified dams.
    3. If only a small proportion of dams are unknown (less than 5% or so), you could replace the missing dam codes by some dummy code, assigning a different fictitious dam to each animal with unknown dam.

N.B. Even if all animals in the data have known dams, you may have animals in the pedigree with unknown dams. If you wish to fit a maternal genetic effect, you will then similarly need to assign dummy dam codes for all unknown dams, i.e. the third column in the pedigree file cannot contain any zeros. Again, your analysis will work best if this proportion of dams is relatively small.

Accuracy of breeding values

  • Q: I am using WOMBAT to obtain breeding values for animals. How can I get the corresponding accuracies?
  • A: This depends on what exactly you are doing:
    1. If you have used the −−blup runtime option, WOMBAT calculates the inverse of the coefficient matrix in the mixed model equations to obtain solutions for all fixed and random effects fitted, and provides corresponding standard errors, obtained from the diagonal elements of the inverse coefficient matrix. This means that you can easily calculate accuracies from the standard errors given.
    2. If you have obtained solution for animals' genetic effects as a by-product of a run to estimate variance components, chances are that you have used the AI-REML algorithm (the default) in the final iterates. This uses a computing strategy which does not require the inverse of the coefficient matrix, and standard errors for fixed and random effects fitted are thus not available `automatically'. Standard errors for the effects fitted can be obtained by carrying out a continuation run, specifying one round of the EM-algorithm, i.e. wombat −c −−emalg1. Note though that this algorithm does not provide sampling errors of parameter estimates and will overwrite the file SumEstimates.out, i.e. you may wish to rename your results file before this additional run. Alternatively, you could use run options −c −−blup for this purpose; note though that −−blup switches off pruning of pedigrees, i.e. that this may cause WOMBAT to recalculate inbreeding coefficients and the inverse of the numerator relationship matrix. Once you have obtained standard errors for your breeding values, you can again readily derive the corresponding accuracies.
    3. If you have used WOMBAT to set up and solve a set of mixed model equations iteratively, chances are that there are to many equations to invert the corresponding coefficient matrix. You may then want to approximate accuracies. Most approximation procedures described in the literature utilise selected parts of the coefficient matrix. Hence, WOMBAT provides the runtime option −−mmeout which writes out the complete mixed equations (non-zero elements of the coefficient matrix only) to file, to facilitate such calculations.

Plant pedigrees

  • Q: I am trying to use WOMBAT to analyse data on plants where I can have selfing or individuals which can be both sires and dams. However, WOMBAT stops with an error message claiming that my pedigree records are invalid. What can I do?
  • A: WOMBAT has been written with the analysis of data from livestock in mind where such pedigrees are indeed not plausible and such checks thus help to track pedigree errors. You can switch these checks off using a run time option of −−self (not in the manual), provided that you are confident the standard rules to set up the inverse of the numerator relationship matrix are applicable. An alternative is to set up the inverse relationship matrix yourself and supply it as a generalized inverse covariance matrix (.gin file).

RR breeding values

  • Q: I am fitting a random regression model with age as the `control' variable and want to calculate breeding value estimates for specific age points. How do I do that?
  • A: WOMBAT will give you estimates of the random regression (RR) coefficients. Say you have fitted a random effect called animal to represent direct, additive genetic effects – the estimates of the RR coefficients are the in the file ''RnSoln_animal.dat''. Further, say you have fitted 3 basis functions Graph, such as the first three Legendre polynomials, and that you are interested in breeding values at age a. You then need to evaluate the regression equation Graph for each animal, with Graph the estimated RR for individual i and Graph the j-th basis function evaluated for a. WOMBAT does not perform these simple calculations for you, but to make this task easier, it writes out a file with the basis functions evaluated for all values of the control variable occurring in the data – see the manual for details!

Reading .bin files

  • Q: WOMBAT writes out a number of binary (.bin) files. Is there any way I can access the information in these - I'd be interested in things like the inbreeding coefficients for individual animals.
  • A: Well, these files are not really meant to be read by the outside world - that's one reason why they are binary. However, I have a small number of simple, stand-alone programs to read these. You need a FORTRAN compiler and a modicum of programming knowledge to modify them to generate output according to your requirements. See: Auxiliary Programs
    NB: The current version of WOMBAT writes out the inbreeding coefficients (in %) for individual levels of genetic effects as the last column in the corresponding "RnSoln_*.dat" fi−les.

Positive definite input matrix

  • Q: I am trying to run a multivariate analysis, but WOMBAT stops immediately with a message that that the Matrix of starting values is “invalid” – what does this mean and what can I do about it? And why can't WOMBAT fix this automatically?
  • A: Covariance matrices for multivariate (and random regression) analyses must be positive definite (p.d.). The statistical definition is that for a p.d. matrix A, all quadratic forms x'Ax are positive, with x an arbitrary vector of appropriate dimension. A p.d. covariance matrix implies that all variances are positive, that all correlations are less than unity (absolute value), and that all partial correlations are consistent with each other.
    The easiest way to decide whether a matrix is p.d. is to inspect its eigenvalues or its Cholesky decomposition. There are many software packages available to do this. For instance, in R eigen() will give you the eigenvalue decomposition and chol() the Cholesky factor (you can also use the −−inveig option in WOMBAT to look at eigenvalues). A p.d. matrix cannot have any negative or zero eigenvalues or non-positive `pivots' (diagonal elements) in the Cholesky factor. This is the requirement for standard, full rank analyses in WOMBAT; for reduced rank analyses via the PC option, the number of non-zero eigenvalues (or pivots) has to be at least equal to the number of principal components fitted.
    During estimation, WOMBAT constrains estimated matrices to have these properties, checking eigenvalues at each iteration step. However, if it finds a `invalid' matrix of starting values, it will stop with an error message. While the program could, in principle, readily carry out the necessary calculations to modify such `invalid' starting values, this may lead to rather bad starting values and is thus not done.
    To fix the problem, modify your input matrix until all eigenvalues are positive. WOMBAT uses a Cholesky factorization to check starting values. If the error message complains about a (negative) pivot close to zero, adding a small constant to the diagonals is often sufficient to make a matrix p.d.; if the negative pivot is not close to zero, something else is likely to have gone wrong – this could be as simple as a typing error or having specified the lower rather than the upper triangle of the covariance matrix.

Weighted analysis

  • Q: How do I run a weighted analysis in WOMBAT?
  • A: That depends on what exactly you mean by `weighted'.
    1. Fixed weights: If your weights do not depend on the variance components to be estimated or any of the effects in the model of analysis, then really all you need to do is weigh your observations appropriately (e.g. multiply or divide by weight) prior to the analysis.
    2. Variable weights: In other cases, the weights to apply depend on the variance components and change with each round of iteration.
      The best strategy to deal with this is to carry out your analysis one iterate at a time, scaling observations as required before each iterate – it may be a bit tedious, but it will do what you want and give you full flexibility in applying different kinds of weights.
    3. WOMBAT does have an experimental SPECIAL option for a WEIGHTED analysis, but this is rather limited in what it does and has not been thoroughly tested; See WOMBAT manual.

Heterogeneous variances

  • Q: I want to fit a model with heterogeneous residual variances. Can WOMBAT do that? I can't seem to find anything in the manual.
  • A: There is no direct option for heterogeneous variances for standard uni- and multivariate analyses. However, this does not mean you cannot fit such models. The trick is to think of your problem as a special kind of random regression analysis – if you can formulate it as such, it is highly likely that you'll be able to fit it in WOMBAT.

Who uses it?

  • Q: Is anybody actually using WOMBAT? I have not seen any publications citing it - so it can't be any good.
  • A: A number of people use it. Bear in mind that is was only reased in mid-2006. A small, but growing list of publications is here.


Views
Navigation
Personal Tools
Toolbox