relvm: Multiple Estimation Of The Random Effect Latent Variable...

Description Usage Arguments Value See Also Examples

View source: R/archive/estimate - Copy.R View source: R/estimate.R

Description

Estimate multiple measure groups of the random effect latent variable model

relvm.

Usage

1
2
relvm(object, groups = NULL, fit = list(inits = NULL, use_wt = c("step2")),
  file = NULL)

Arguments

object

A mstbl object.

groups

A vector of measure group names. The default is NULL, in which case a vector of all groups will be generated accordingly.

fit

A list of fitting parameters.

  • init: Initial values for mu, fl, and err term in a data frame. fl is the factor loading. They will be initialized generally if it is null. The default is zero for mu and one for the rest.

  • predict: The default is TRUE, which calculate the group score for each hospital.

  • use_wt: A vector of strings, eg. c("step1", "step2"), corresponding to step 1 (optimize the model parameters) and step 2 (predict the group score) in the latent variable model, respectively. For example, fit = list(use_wt = "step2") tells the program to ignore the weight in step 1 and only use the weight in step 2.

file

File name in a rds format to cache the results on hard drive.

Value

An list of S3 object of class "relvms" with estimated parametes.

See Also

mstbl

Examples

1
2
3
4
5
6
7
8
9
# require(rstarating)
# To fit just one group: 'outcome_mort'
fit <- relvm(mstbl(cms_star_rating_input_2017dec),groups="outcome_mort")

# use weight in step 2 only (by default, weigt are used in step 1 and step 2)
fit <- relvm(mstbl(cms_star_rating_input_2017dec),groups="outcome_mort", fit=list(use_wt="step2"))

# Use weight in step 1 only (for test purpose only).
fit <- relvm(mstbl(cms_star_rating_input_2017dec),groups="outcome_mort", fit=list(use_wt="step1"))

huangrh/relvm documentation built on May 17, 2019, 9:10 p.m.