- data
A data frame encoding the data used in the analysis. Can be missing if covs and nobs are supplied.
- omega
The network structure. Either "full" to estimate every element freely, "zero" to set all elements to zero, or a matrix of the dimensions nNode x nNode with 0 encoding a fixed to zero element, 1 encoding a free to estimate element, and higher integers encoding equality constraints. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix.
- tau
Optional vector encoding the threshold/intercept structure. Set elements to 0 to indicate fixed to zero constrains, 1 to indicate free intercepts, and higher integers to indicate equality constraints. For multiple groups, this argument can be a list or array with each element/column encoding such a vector.
- beta
Optional scalar encoding the inverse temperature. 1 indicate free beta parameters, and higher integers to indicate equality constraints. For multiple groups, this argument can be a list or array with each element/column encoding such scalars.
- beta_model
How should beta be modeled? Set beta_model = "log_beta" to model the log of beta rather than beta directly.
- vars
An optional character vector encoding the variables used in the analysis. Must equal names of the dataset in data.
- groups
An optional string indicating the name of the group variable in the data.
- covs
A sample variance--covariance matrix, or a list/array of such matrices for multiple groups. Make sure covtype argument is set correctly to the type of covariances used.
- means
A vector of sample means, or a list/matrix containing such vectors for multiple groups.
- nobs
The number of observations used in covs and means, or a vector of such numbers of observations for multiple groups.
- covtype
If 'covs' is used, this is the type of covariance (maximum likelihood or unbiased) the input covariance matrix represents. Set to "ML" for maximum likelihood estimates (denominator n) and "UB" to unbiased estimates (denominator n-1). The default will try to find the type used, by investigating which is most likely to result from integer valued datasets.
- responses
A vector of the response options used, encoded identically across all variables (e.g., c(-1,1), c(0,1), c(-1,0,1) or seq(-5,5)). Automatically detected from the data when not supplied; required when covs is used. Any number of distinct response options is allowed, and the values need not be integers.
- missing
How should missingness be handled when data is used. Only "listwise" (listwise deletion) is currently supported for the Ising model; other options (e.g. "pairwise") are rejected at construction because they produce undefined sufficient statistics.
- equal
A character vector indicating which matrices should be constrained equal across groups.
- baseline_saturated
A logical indicating if the baseline and saturated model should be included. Mostly used internally and NOT Recommended to be used manually.
- estimator
The estimator to be used. Currently implemented are "ML" for (exact) maximum likelihood estimation and "PML" for penalized maximum likelihood estimation; no other estimators are supported for the Ising model.
- optimizer
The optimizer to be used. Can be one of "nlminb" (the default R nlminb function), "ucminf" (from the optimr package), "nloptr_TNEWTON" (preconditioned truncated Newton via nloptr), and "LBFGS++" (pure C++ L-BFGS-B). Defaults to "nlminb".
- storedata
Logical, should the raw data be stored? Needed for bootstrapping (see bootstrap).
- WLS.W
Optional WLS weights matrix. CURRENTLY NOT USED.
- sampleStats
An optional sample statistics object. Mostly used internally.
- identify
Logical, should the model be identified?
- verbose
Logical, should messages be printed?
- maxNodes
The maximum number of nodes allowed in the analysis. Used to set the default of maxStates (2^maxNodes); for binary data this reproduces the historical node limit. It is not recommended to set this higher.
- maxStates
The maximum number of response patterns the exact ML estimator may enumerate. Exact ML estimation of the Ising model sums over every possible response pattern when computing the partition function, expected values and (expected) Hessian, so the cost grows as length(responses)^nNode. The function stops with an error when length(responses)^nNode exceeds maxStates. The default 2^maxNodes reproduces the historical binary node limit while accounting for more than two response options. Raise this only if the computation is feasible (note that the number of states---and hence the run time---grows very quickly with both the number of nodes and the number of response options).
- min_sum
The minimum sum score that is artificially possible in the dataset. Defaults to -Inf. Set this only if you know a lower sum score is not possible in the data, for example due to selection bias.
- bootstrap
Should the data be bootstrapped? If TRUE the data are resampled and a bootstrap sample is created. These must be aggregated using aggregate_bootstraps! Can be TRUE or FALSE. Can also be "nonparametric" (which sets boot_sub = 1 and boot_resample = TRUE) or "case" (which sets boot_sub = 0.75 and boot_resample = FALSE).
- boot_sub
Proportion of cases to be subsampled (round(boot_sub * N)).
- boot_resample
Logical, should the bootstrap be with replacement (TRUE) or without replacement (FALSE)
- penalty_lambda
Numeric penalty strength for penalized ML estimation (PML/PFIML). NA (default) triggers automatic selection via EBIC-based grid search when a penalized estimator is used; set to a specific numeric value to use a fixed penalty strength (0 = no penalty). See find_penalized_lambda and penalize.
- penalty_alpha
Elastic net mixing parameter: 1 = LASSO (default), 0 = ridge.
- penalize_matrices
Character vector of matrix names to penalize. If missing, defaults are selected based on the model type.