# How to pass starting values in matrix form?

Consider the following MWE, where I try to pass starting values to FindDistributionParameters[]:

ρ=0.1;
n=2;
data=RandomVariate[MultivariateTDistribution[{0,0},{{1,ρ},{ρ,1}},10],100];
emptyμ[n_] := Table[Subscript[μf, i], {i, 1, n}];
emptyΣ[n_] :=
Table[Subscript[σf^(1 + KroneckerDelta[i, j]),
Sort[{i, j}]], {i, 1, n}, {j, 1, n}];
fit = FindDistributionParameters[data,
MultivariateTDistribution[emptyμ[n],
emptyΣ[n], ν]];


I tried to add starting values to FindDistributionParameters[] as:

p = Flatten[{emptyμ[n], emptyΣ[n], ν}]
p0 = Flatten[{Mean[data], Covariance[data], 5}]
start1 = {p, p0}\[Transpose]
start2 = Rule @@@ %
start3 = {emptyμ[n] -> Mean[data], emptyΣ[n] -> Covariance[data] , ν -> 5}

fit = FindDistributionParameters[data,
MultivariateTDistribution[emptyμ[n],
emptyΣ[n], ν], start1(*start2, start3*)];


However, nothing works.

Also, is it possible to pass only starting values for one of the required parameters, e.g. start4 = {{ν, 5}}?

• Hm weird. I strongly believe that this is a bug. I would appreciate it if you contacted Wolfram Support about it. – Henrik Schumacher Nov 4 '18 at 15:45
• Have you got an evaluation order problem? Would wrapping Evaluate round MultivariateTDistribution[...] help? – mikado Nov 4 '18 at 16:02
• Thank you @HenrikSchumacher, I just opened a Question in Wolfram's community forum - unfortunately I do not have access to their advanced technical support. – CFW Nov 4 '18 at 16:02
• @mikado, just tried - no joy. – CFW Nov 4 '18 at 16:04
• What does "nothing works" mean? Is there a specific error message? – JimB Nov 5 '18 at 0:19

Edit: I've removed my answer about blaming the problem on using Subscript (although I think that one should avoid subscripts almost always).

I'm now pretty sure the issue is that the covariance term is listed twice in the starting values:

start1 = {p, p0}\[Transpose]


This is fixed with

start1 = DeleteDuplicates[{p, p0}\[Transpose]]


But sometimes the maximum number of iterations might need increasing. Also, it might be best to create a table of log likelihood values keeping ν as an integer and choose the integer value that maximizes the log of the likelihood.