brandmaier / semtree

Recursive Partitioning for Structural Equation Models
https://brandmaier.github.io/semtree/
GNU General Public License v3.0
13 stars 11 forks source link

re-structuring semtree.control() #47

Open brandmaier opened 2 years ago

brandmaier commented 2 years ago

This is a discussion on whether we want to improve the accessibility of the semtree.control-object based on ideas of @manuelarnold. He suggested to restructure as following:

I like the separation of the score vs LR and a second argument to specify how the LR tests are done. However, I suggest that instead of fast_tree as an argument, we provide a separate constructor for the control object, that is, you call semtree.control.fast() which then returns a control-object that has score.tests=list(nominal = 'LMuo', ordinal = 'WDM', metric = 'DM' and method="score".

manuelarnold commented 2 years ago

I like this idea a lot. It makes the original semtree.control function less crowded. By the way, we should either use a dot or an underscore in the argument names of a function.

brandmaier commented 2 years ago

I vote all underscore (LR_tests, score_tests, ...). For consistency, should it also be semtree_control ?

manuelarnold commented 2 years ago

I also prefer underscores because dots can be confused with S3 methods. I would go for semtree_control. Maybe we could keep a semtree.control function in the package with a warning that it is deprecated and will be removed in the future?