I wanted to do a power analysis of an interaction in a non-experimental dataset I have using
I can"tidy" my model using
broom.mixed::tidy, but I think because of the extra parameters, it is throwing DD off. In essence, I think the problem is that I need to write a custom tidy function, and I wanted to get advice on the best way to do this.
library(DeclareDesign) library(lmerTest) pop <- declare_population(data = mtcars) model <- declare_estimator(mpg ~ wt*carb + (1|cyl), model = lmer) diagnose_design(pop + model, sims = 15) #> Warning in nextpar(mat, cc, i, delta, lowcut, upcut): Last two rows have #> identical or NA .zeta values: using minstep #> Warning in FUN(X[[i]], ...): non-monotonic profile for .sig01 #> Warning in confint.thpr(pp, level = level, zeta = zeta): bad spline fit #> for .sig01: falling back to linear interpolation #> Warning in regularize.values(x, y, ties, missing(ties), na.rm = na.rm): #> collapsing to unique 'x' values #> Error: Error in step 2 (estimator): #> Error in fit2tidy(results, coefficient_names): We were unable to tidy the output of the function provided to 'model'. #> It is possible that the broom package has a tidier for that object type. #> If not, you can use a custom estimator to 'estimator_function'. #> See examples in ?declare_estimator
edit: also see: Diagnosing multilevel models