ds_logistic_reg_featx: Logistic regression with feature extraction

Description Usage Arguments See Also Examples

View source: R/logistic-reg-featx.R

Description

Logistic regression with a feature extraction step applied to the training data, e.g. PCA.

Usage

1
ds_logistic_reg_featx(space, data, n_comp = 5)

Arguments

space

(character(1))
Name of the V-Dem indicator for a democratic space

data

(base::data.frame()) A data frame or similar object

n_comp

the number of components to keep

See Also

Other Other DS models: ds_logistic_reg(), ds_reg_logreg()

Examples

1
2
3
4
5
data("states")

mdl   <- ds_logistic_reg_featx("v2x_veracc_osp", states)
preds <- predict(mdl, new_data = states)
head(preds)

andybega/demspaces documentation built on April 18, 2021, 11:05 p.m.