Skip to content

Feature Request or Bug? standardize_parameters for fixest objects #1178

@DanSimonet

Description

@DanSimonet

Unsure if this is more feature request or bug? fixest is a supported package from insights and we can run parameters() on fixest objects but standardize_parameters() does not work for any method. For fixest specifically it may be a feature request because most users would only want standardized beta weights of the primary predictors and not fixed effects (often high-dimensional categorical) with posthoc estimates from SD often being sufficient.

Example

library(fixest)

lm1  <- lm(mpg ~ hp + factor(am) + factor(cyl), data = mtcars)
f1  <- feols(mpg ~ hp | am + cyl, data = mtcars)

# Works
standardize_parameters(lm1)

# Doesn't Work
standardise_parameters(f1)

Specific errors for each method appear mostly in inability to access the unique structure of fixest objects which differ from lm objects. For instance, you can run fixest_data(x, sample = "estimation") to pull the data used to estimate the model.

standardise_parameters(f1, method = "refit")

Error in feols(fml = mpg ~ hp | am + cyl, data = data_std) : 
  Argument 'data' could not be evaluated.
PROBLEM: object 'data_std' not found.

standardise_parameters(f1, method = "posthoc")

Error in if (mi$is_linear && colnames(stats::model.frame(model))[1] !=  : 
  missing value where TRUE/FALSE needed

There is also this related stackoverflow question: https://stackoverflow.com/questions/75229080/fixest-and-standardized-coefficients-from-easystats-in-r

Metadata

Metadata

Assignees

Labels

Bug 🐛Something isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions