ImpGamlssFit: GAMLSS imputation fit

Description Usage Arguments Value

View source: R/imp_gamlss_fit.R

Description

This function takes a data set to fit a gamlss model and another to predict the expected parameters values. It returns a function that will generate a vector of random observations for the predicted parameters. The amount of random observations is the number of units on the dataset used to get such predictions.

Usage

1
2
3
4
ImpGamlssFit(data, new.data, family, n.ind.par, gam.mod,
  mod.planb = list(type = "pb", par = list(degree = 1, order = 1)),
  n.par.planb = n.ind.par, lin.terms = NULL, n.cyc = 5, bf.cyc = 5,
  cyc = 5, forceNormal = FALSE, trace = FALSE, ...)

Arguments

data

Completely observed data frame to be used to fit a gamlss model estimate.

new.data

Data frame used to predict the parameter values for some given right side x-values on the gamlss model.

family

Family to be used for the response variable on the GAMLSS estimation.

n.ind.par

Number of individual parameters to be fitted. Currently it only allows one or two because of stability issues for more parameters.

gam.mod

list with the parameters of the GAMLSS imputation model.

mod.planb

list with the parameters of the alternative GAMLSS imputation model.

n.par.planb

number of individual parameters in the alternative model.

lin.terms

Character vector specifying which (if any) predictor variables should enter the model linearly.

n.cyc

number of cycles of the gamlss algorithm

bf.cyc

number of cycles in the backfitting algorithm

cyc

number of cycles of the fitting algorithm

forceNormal

Flag that if set to 'TRUE' will use a normal family for the gamlss estimation as a last resource.

trace

whether to print at each iteration (TRUE) or not (FALSE)

...

extra arguments for the control of the gamlss fitting function

Value

Returns a method to generate random samples for the fitted gamlss model using "new.data" as covariates.


ImputeRobust documentation built on May 2, 2019, 3:27 a.m.