Hi, I followed the DataFrames.jl workshop earlier this week at JuliaCon, and it was my first time using DataFrames in Julia, hence why I am posting in First Steps.
I was able to follow until the last part of the worshop when an example of bootstrapping was shown. The function below computes a probit model on a dataframe and is called on bootstrapped dataframes.
I am having a hard time understading the return statement. I was hoping someone could walk me through all that is happening on that line, especially what happens with the splat … operator and the semi colon.
function boot_sample(df)
df_boot = df[rand(1:nrow(df), nrow(df)), :]
probit_boot = glm(@formula(lfp ~ lnnlinc + age + age^2 + educ + nyc + noc + foreign),
df_boot, Binomial(), ProbitLink())
return (; (Symbol.(coefnames(probit_boot)) .=> coef(probit_boot))...)
end