Description Usage Arguments Details Examples
Core function of the ghp
package. Gives the ability to fit all
possible models and then find out what influence certain variables or groups
of variables have on a specified goodness of fit.
1 2 
depname 
The name of the dependent variable in character form, e.g.

data 
A data.frame holding all relevant explanatory variables. 
gof 
Goodness of fit which should be obtained for all models. Which is available depends on the method with which the models were computed. Currently:

method 
The method with which the models shall be computed. Can be one
of 
npar 
Number of distributional parameters for which hierarchical partitioning should be done. 
group_df 
A data.frame object for grouping. One column, 
This function computes the hierarchical partitioning in four steps:
Transforming the data (necessary because of the ability to
specify groups of variables), indep_tf
Fitting of all
possible models mfit
Obtaining the wanted goodnessoffit
figures gof
Do hierarchical partitioning
part
Afterwards, you can plot the results with
plot_ghp
1 2 3 4 5 6 7 8 9 10  # Dataset
india < ghp::india
# Linear models: Partitioning of r.squared
results_lm < ghp(depname = "stunting", india, method = "lm", gof = "r.squared")
results_lm
# GAMLSS models: Partitioning of deviance (npar = 2)
results_gamlss < ghp("stunting", india, method = "gamlss", gof = "deviance", npar = 2)
results_gamlss

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.