Why fdistccdf function is ccdf?

I see a code as follows:

p = fdistccdf(dof_, dof_tstat_, F)
# source code of pkg FixedEffectModels

it can be seen this function is in pkg StatsFuns

So I click it in the VS code, it jumps to

  • so why a function named fdistccdf will be math with ccdf?
  • is the dollar sign cause this? What does it mean?

It is the $, yes. If you look further up in the file you’ll see that the definition is inside a quote. The $ signifies that the value of the following expression (ccdf, and pdecls..., pargs..., etc) from outside the quote should be inserted there. The variables ccdf, pfun, pargs, and pdecls are defined before the quote. The definition means that the fdistccdf is a call to a compiled function (via ccall).

This is an example of metaprogramming, i.e. construction of julia expressions from strings and other things. It is described here: https://docs.julialang.org/en/v1/manual/metaprogramming/

It help me to understand this code perfectly, thx. So packages of julia may need more document, or it’s hard to understand.