Skip to contents

Define a scope for the gam. Used as default input to the scope argument in xpose.gam

Usage

xp.scope3(
  object,
  covnam = xvardef("covariates", object),
  nmods = 3,
  smoother1 = 0,
  arg1 = NULL,
  smoother2 = 1,
  arg2 = NULL,
  smoother3 = "ns",
  arg3 = "df=2",
  smoother4 = "ns",
  arg4 = "df=3",
  excl1 = NULL,
  excl2 = NULL,
  excl3 = NULL,
  excl4 = NULL,
  extra = NULL,
  subset = xsubset(object),
  ...
)

Arguments

object

An xpose.data object.

covnam

Covariate names to test.

nmods

Number of models to examine.

smoother1

Smoother for each model.

arg1

Argument for model 1.

smoother2

Smoother for each model.

arg2

Argument for model 2.

smoother3

Smoother for each model.

arg3

Argument for model 3.

smoother4

Smoother for each model.

arg4

Argument for model 4.

excl1

Covariate exclusion from model 1.

excl2

Covariate exclusion from model 2.

excl3

Covariate exclusion from model 3.

excl4

Covariate exclusion from model 4.

extra

Extra exclusion criteria.

subset

Subset on data.

...

Used to pass arguments to more basic functions.

See also

Examples


xp.scope3(simpraz.xpdb)
#> $SEX
#> ~1 + SEX
#> <environment: 0x555b7d807180>
#> 
#> $RACE
#> ~1 + RACE
#> <environment: 0x555b7d807180>
#> 
#> $SMOK
#> ~1 + SMOK
#> <environment: 0x555b7d807180>
#> 
#> $HCTZ
#> ~1 + HCTZ
#> <environment: 0x555b7d807180>
#> 
#> $PROP
#> ~1 + PROP
#> <environment: 0x555b7d807180>
#> 
#> $CON
#> ~1 + CON
#> <environment: 0x555b7d807180>
#> 
#> $AGE
#> ~1 + AGE + ns(AGE, df = 2)
#> <environment: 0x555b7d807180>
#> 
#> $HT
#> ~1 + HT + ns(HT, df = 2)
#> <environment: 0x555b7d807180>
#> 
#> $WT
#> ~1 + WT + ns(WT, df = 2)
#> <environment: 0x555b7d807180>
#> 
#> $SECR
#> ~1 + SECR + ns(SECR, df = 2)
#> <environment: 0x555b7d807180>
#>