-
coefnames(probit_boot)returns aVectorofStrings corresponding to"lnnlinc","age", etc. -
Symbol.(coefnames(probit_boot))casts these strings asSymbols, which is necessary because it uses the(; ags...)constructor for aNamedTuple. - In Julia, a
NamedTupleis kind of like a dictionary, in that it can be used to look up objects based on aSymbol. The syntax(; :a => 1, :b => 2)can be used to create the named tuple(a = 1, b = 2). Using=>instead of=means you can construct named tuples programmatically, i.e. not writing out the literalabut rather using something likea_sym = :a; (; a_sym => 1).
1 Like