Train response model (response variable as outcome and covariates) from all compliers (actual + predicted) in experimental data using Tensorflow.
deep_response_model(
response.formula,
exp.data,
exp.compliers,
compl.var,
algorithm = "adam",
hidden.layer = c(2, 2),
hidden_activation = "relu",
epoch = 10,
verbose = 1,
batch_size = 32,
output_units = 1,
validation_split = NULL,
patience = NULL,
output_activation = "linear",
loss = "mean_squared_error",
metrics = "mean_squared_error",
dropout_rate = NULL
)model object of trained response model.
formula specifying the response variable and covariates.
experimental dataset.
data.frame object of compliers from
complier_predict.
string specifying binary complier variable
string for optimizer algorithm in response model.
vector specifying hidden layers and the number of neurons in each hidden layer
string or vector for activation functions in hidden layers.
integer for number of epochs
1 to display model training information and learning curve plot. 0 to suppress messages and plots.
batch size to split training data.
integer for units in output layer. Defaults to 1 for continuous and binary outcome variables. In case of multinomial outcome variable, value should be set to the number of categories.
double for the proportion of test data to be split as validation in response model.
integer for number of epochs with no improvement after which training will be stopped.
string for activation function in output layer. "linear" is recommended for continuous outcome variables, and "sigmoid" for binary outcome variables
string for loss function. "mean_squared_error" recommended for linear models, "binary_crossentropy" for binary models.
string for metrics. "mean_squared_error" recommended for linear models, "binary_accuracy" for binary models.
double or vector for proportion of hidden layer to drop out in response model.