aldvmm.pred {aldvmm}  R Documentation 
Predicting Expected Values from Adjusted Limited Dependent Variable Mixture Models
Description
aldvmm.pred
makes
predictions of observations in design matrices in 'X'
using parameter
estimates returned by
aldvmm
.
Usage
aldvmm.pred(par, X, y = NULL, psi, ncmp, dist, lcoef, lcpar, lcmp)
Arguments
par 
a named numeric vector of parameter values. 
X 
a list of design matrices returned by

y 
a numeric vector of observed outcomes from complete observations in

psi 
a numeric vector of minimum and maximum possible utility values
smaller than or equal to 1 (e.g. 
ncmp 
a numeric value of the number of components that are mixed. The
default value is 2. A value of 1 represents a tobit model with a gap
between 1 and the maximum value in 
dist 
an optional character value of the distribution used in the
components. In this release, only the normal distribution is
available, and the default value is set to 
lcoef 
a character vector of length 2 with labels of objects including
regression coefficients of component distributions (default 
lcpar 
a character vector with the labels of objects including
constant parameters of component distributions (e.g. the standard
deviation of the normal distribution). The length of 
lcmp 
a character value representing a stub (default 
Details
aldvmm.pred
calculates expected values for observations in design matrices in 'X'
using the expected value function published in Hernandez Alava and Wailoo
(2015). Constant distribution parameters that need to be nonnegative (i.e.
standard deviations of normal distributions) enter the expected value
function as logtransformed values.
Value
a list of of predicted outcomes including the following elements.
y 
a numeric vector of observed outcomes in 
yhat 
a numeric vector of fitted values. 
res 
a numeric vector of residuals. 
prob 
a numeric matrix of expected
probabilities of group membership per individual in 