cmreg is used to run a regression with the latent sensitive trait as a predictor.

cmreg_p(
  formula,
  crosswise,
  anchor,
  p,
  p.prime,
  data,
  start = NULL,
  n.start = 3L,
  control = list()
)

cmreg.p(...)

Arguments

formula

an object of class "formula": a symbolic description of the model to be fitted. Ex. Outcome ~ Covariates. The crosswise and anchor responses are supplied separately through `crosswise` and `anchor`.

crosswise

Unquoted column name (or a single character column name) for the crosswise response.

anchor

Unquoted column name (or a single character column name) for the anchor response.

p

an auxiliary probability for the crosswise question.

p.prime

an auxiliary probability for the anchor question.

data

a data frame containing information from the crosswise model, the outcome variable, and covariates.

start

Optional numeric vector of starting values on the reporting scale: beta, theta, gamma, crosswise effect, and a positive sigma. By default, starts are derived from GLM and least-squares fits to observed responses.

n.start

Number of optimization starts, including the data-informed start.

control

A list of control settings passed to [stats::optim()]. `fnscale` is fixed internally because the log-likelihood is maximized.

...

Arguments passed to cmreg_p().

Value

An object of class `cmreg_p` (and `cmreg`), a list with:

Call

The matched model call.

Coefficients

A coefficient table for the Gaussian outcome model, including the latent-trait effect.

AuxiliaryCoef, AuxiliaryCoef2

Coefficient tables for the crosswise and anchor-response models, with the residual standard deviation.

VCV

The estimated variance-covariance matrix of all parameters.

estimates, std.errors

Named full-precision parameter estimates and standard errors.

logLik, n, convergence

The optimized log-likelihood, number of complete observations, and optimizer convergence code.

References

Atsusaka, Y. and Stevenson, R. T. (2023). The crosswise model for sensitive survey questions. doi:10.1017/pan.2021.43 .

See also

[cmpredict_p()] for predictions conditional on latent-trait status and [cmreg()] for a model with the latent trait as the outcome.

Examples

m2 <- cmreg_p(V ~ age + female, crosswise = Y, anchor = A, p = 0.1,
              p.prime = 0.15, data = cmdata3)
m2
#> Call:
#> cmreg_p(formula = V ~ age + female, crosswise = Y, anchor = A, 
#>     p = 0.1, p.prime = 0.15, data = cmdata3)
#> 
#> Crosswise regression with the latent trait as a predictor.
#> n = 2000, log-likelihood = -5378
#> 
#> Coefficients:
#>             Estimate Std. Error Z score Pr(>|z|)
#> (Intercept)   0.0236     0.1478  0.1595   0.8733
#> age           0.0096     0.0048  2.0054   0.0449
#> female        0.2473     0.0520  4.7517   0.0000
#> Y             0.9859     0.0756 13.0368   0.0000
#> 
#> Auxiliary coefficients:
#>             Estimate Std. Error Z score Pr(>|z|)
#> (Intercept)  -1.7342     0.4010 -4.3253   0.0000
#> age           0.0352     0.0126  2.7948   0.0052
#> female        0.2880     0.1356  2.1235   0.0337
#> 
#> Additional auxiliary coefficients:
#>             Estimate Std. Error Z score Pr(>|z|)
#> (Intercept)   0.2468     1.0680  0.2311   0.8172
#> age           0.0548     0.0370  1.4821   0.1383
#> female       -0.1076     0.3779 -0.2849   0.7758
#> sigma         1.0438     0.0206 50.7779   0.0000