mirror of
https://github.com/MillironX/beefblup.git
synced 2024-11-13 03:03:08 +00:00
Fix solving the mized model equation
This commit is contained in:
parent
eb0ca76d19
commit
eb20b8b552
1 changed files with 4 additions and 4 deletions
|
@ -121,7 +121,7 @@ for i = 1:length(normal)
|
|||
end
|
||||
|
||||
% Create an empty matrix for the additive relationship matrix
|
||||
A = sparse(numanimals, numanimals);
|
||||
A = zeros(numanimals, numanimals);
|
||||
|
||||
% Create lambdas to find sire and dam of each animal
|
||||
dam = @(id) [data{animalrow(num2str(id)), 3}];
|
||||
|
@ -166,13 +166,13 @@ for i = 1:numanimals
|
|||
end
|
||||
|
||||
% Extract the observed data
|
||||
Y = data{:, 5};
|
||||
Y = cell2mat(data(:, 5));
|
||||
|
||||
% The identity matrix for random effects
|
||||
Z = speye(numanimals, numanimals);
|
||||
Z = eye(numanimals, numanimals);
|
||||
|
||||
% Prompt for heritablity
|
||||
h2 = str2double(input('What is the heritablity for this trait? >> '));
|
||||
h2 = input('What is the heritablity for this trait? >> ');
|
||||
lambda = (1-h2)/h2;
|
||||
|
||||
% Use the mixed-model equations
|
||||
|
|
Loading…
Reference in a new issue