1
$\begingroup$

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}}?

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

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]

Duplicate starting values

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.