fit_theta_y: Do a maximum likelihood fit for theta_y

Description Usage Arguments Details Value Author(s)

View source: R/fit_theta_y.R

Description

fit_theta_y does a maximum likelihood fit for theta_y

Usage

1
fit_theta_y(x, Y, modSpec, verbose = F, reqConv = T)

Arguments

x

Vector of indepenent variable observations

Y

Matrix of dependent variable observations

modSpec

A list specifying the model to use

verbose

Whether to print out information on the fit

Details

x is a vector of length n and Y is a matrix of size (J+K) by N, where J is the number of ordinal observations and K the number of continuous observations. modSpec, which stands for model specification, specifies the model. In particular, it is a list with the following fields:

J Number of ordinal observations K Number of continuous observations M Number of ordinal categories for each ordinal variable (a vector of length J) meanSpec Specification of the parametetric form of the mean response. Currently, only powLaw, for power law, is supported. hetSpec Heteroskedasticity specification. Currently, 'none' (homoskedastic), sd_x (the standard deviation scales linearly with x), and sd_resp (the standard deviation scales lienarly with the response) are supported. For sd_x and sd_resp, the variable hetGroups must also be specified. hetGroups The groups for the heteroskedastic parameters (kappa). A vector of length J+K. Each variable must be assigned a unique group between 1 and G_kappa, and NA can be used so that specific variables are homoskedastic. Only required if hetSpec is sd_x or sd_resp. cdepSpec Conditional dependence specification, which equals either indep (for independent) or dep (for dependent). For dep, the variable cdepGroups must be specified. cdepGroups The groups for the correlation terms for a conditional dependence setting of dep. A vector of length J+K. Each variable must be assigned a unique group between 1 and G_rho, and NA can be used so that specific variables are conditionally independent. Only required if cdepSpec is dep.

Distinct cases for the fit are:

A single variable model Call fitPowLawOrd (ordinal variable) or fitPowLaw (continuous variable)

Value

The fit as a vector

Author(s)

Michael Holton Price <MichaelHoltonPrice@gmail.com>


eehh-stanford/yada documentation built on June 18, 2020, 8:05 p.m.