I am trying to analyze my fitted data using goodness_of_fit, but it does not seem to work with the dataframe I made. I get the error: goodness_of_fit cannot be plotted into a single axis.` I have a dataframe being input, so I don’t understand why it says there is only a single axis.
Here is my code:
## Fitting weibull model to simulated population
@time fit_Weibull = [fit(model_Weibull, pop_Weibull[i], param_Weibull) for i in 1:length(pop_Weibull)]
## Post processing
inspect_Weibull = reduce(vcat, DataFrame(inspect(id)) for id in fit_Weibull)
GoF_Weibull = reduce(vcat, DataFrame(goodness_of_fit(inspect_Weibull)))
you cannot post-process a DataFrame. It has to be of Type FittedPumasInspection. Try this (untested)
## Fitting weibull model to simulated population
@time fit_Weibull = [fit(model_Weibull, pop_Weibull[i], param_Weibull) for i in 1:length(pop_Weibull)]
## Post processing
inspect_Weibull = map(ft -> inspect(ft), fit_Weibull)
GoF_Weibull = map(insp -> goodness_of_fit(insp), inspect_Weibull) # will result in a vector of GOF
you can index in and check each GOF like this GoF_Weibull[1], GoF_Weibull[2] ...
if each of them happen to be just the figure, then you can try
ERROR: Makie.convert_arguments for the plot type Lines{Tuple{StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}, Float64}} and its conversion trait PointBased() was unsuccessful.
The signature that could not be converted was:
::Vector{Float32}, ::Float64
Makie needs to convert all plot input arguments to types that can be consumed by the backends (typically Arrays with Float32 elements).
You can define a method for Makie.convert_arguments (a type recipe) for these types or their supertypes to make this set of arguments convertible (See Plot Recipes).
Alternatively, you can define Makie.convert_single_argument for single arguments which have types that are unknown to Makie but which can be converted to known types and fed back to the conversion pipeline.
@KVTobin can you provide that complete error message, thanks. There’s definitely something odd happening with the argument types internally, so a more complete error will help me better narrow down the issue.