Description Usage Arguments Value See Also
View source: R/ludwig_functions.R
This function accepts a binary matrix of network states and estimates
the thresholds and weights of the network model.
The internally used functions are either cv.glmnet
or glm
.
By default, cv.glmnet
is used.
In this case, the mixing parameter alpha
is set to 0.5
(elastic net regularization) and lambda
is chosen based on the solution with mimimum mean cross-validation error
(argument s = "lambda.min"
passed to function predict.cv.glmnet
).
1 |
data |
a binary matrix of observed network states. The rows are the states, the columns are the nodes. |
method |
the method to be used. Either |
alpha |
the elastic mixing parameter passed to |
s |
value of the penalty parameter passed to |
... |
other arguments passed over to e.g. |
The function returns a list of class estnet
, containing...
the objects returned by the function create_matrix
.
fitted
fitted values based on the estimated parameters.
y
a vector of the observed node states.
logL
the log pseudo likelihood.
deviance
the deviance.
coefficients
the estimated coefficients (thresholds and weights).
weights
the estimated weights.
thresholds
the estimated thresholds.
time
the time used for the estimation process.
net
the list returned by either glm
or cv.glmnet
.
glmnet
, cv.glmnet
, predict.cv.glmnet
,
glm
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.