I'm trying to create a distribution plot from a column of data and fit a continuous distribution to it. The type of distribution I want to fit is variable, but known within the script. I can't for the life of me figure out how to pass a variable as the type of distribution to fit in Fit Distribution()
So far I've tried
fit_type = "Normal";
Distribution(
Column( :data ),
Fit Distribution( fit_type )
);
As well as
fit_type = "Normal";
Distribution(
Column( :data ),
EvalExpr( Fit Distribution( Expr(fit_type) ) )
);
And even
fit_type = "Normal";
string_expr = "Fit Distribution ( " || fit_type || " )";
Distribution(
Column( :data ),
EvalExpr( Expr( string_expr ) )
);
But none of these work. Any ideas out there?