Learn R Programming

esreg (version 0.3.1)

conditional_truncated_variance: Conditional truncated variance

Description

Estimate the variance of y given x and given y <= 0. If approach is:

  1. ind - Variance of all y where y <= 0.

  2. scl_N or scl_sp - Assumes a location-scale model: y = x'b + (x'g)e. First, it estimates b and g using PMLE. Then, it computes the conditional truncated variance by integrating the truncated density of y.

Usage

conditional_truncated_variance(y, x, approach)

Arguments

y

Vector of dependent data

x

Matrix of covariates including the intercept

approach

ind, scl_N or scl_sp