demo_data()

Contents

demo_data()#

liesel_gam.demo_data(n, seed=1)[source]#

Generate demo data for structured additive distributional regression.

Parameters:
  • n (int) – Number of samples (if grid=False).

  • seed (int, default: 1) – Random seed.

Return type:

DataFrame

Returns:

DataFrame with columns:

  • y (response)

  • x_nonlin (continuous covariate with nonlinear effect on both location and scale)

  • x_lin (continuous covariate with linear effect on both location and scale)

  • x_cat (categorical covariate with effect on location)

  • x (continuous covariate with no effect)

Examples

>>> import liesel_gam as gam
>>> gam.demo_data(n=100).columns
Index(['y', 'x_nonlin', 'x_lin', 'x_cat', 'x'], dtype='str')