Functions to calculate a parameter estimates for L1-penalized Binary Markov Models.

1 2 3 4 |

`X` |
Input data matrix consisting of 0-1 entries. Has n rows and p columns. |

`rho` |
Value of the penalty parameter; If a non-negative p-by-p matrix is given, it is used as the penalty structure. |

`rhoVec` |
Gives all values of rho for which the solution should be calculated. |

`thrCheck` |
Error threshold at which convergence is declared. |

`thrPseudo` |
Error threshold for the interal pseudolikelihood algorithm. |

`ThetaStart` |
Starting value for Theta, has to be a p-by-p matrix. |

`verbose` |
Should status messages be printed. |

`maxIter` |
Maximum number of iteratios to run. |

`timeout` |
Number of seconds after which the procedure is stopped; for the path algorithm, this is reset for every value of rho. |

`penalize.diag` |
Should the diagonal be penalized? |

The function `BMNExact`

fits a penalized pairwise binary Markov model to the data provided as matrix `X`

for each of the elements in the penalty parameter vector `rhoVec`

(note that `rhoVec`

will be sorted in increasing order). Internally, the function `BMNExact.single`

is called for each entry in `rhoVec`

and the results are collected as described below.

`rho` |
Vector of penalty parameters sorted in increasing order. |

`ThetaList` |
A list of Theta pxp matrices, corresponding to the penalty parameters in rho. |

`success` |
A logical vector of the same length as rho. True, if the function succeeded for the corresponding value in rho. |

`penalize.diag` |
Logical. Indicates if the diagonal was penalized (same as input value |

Holger Hoefling

1 2 3 4 5 6 7 8 9 10 11 12 | ```
library(BMN)
Theta = matrix(numeric(25), ncol=5);
Theta[1,1]=0.5; Theta[2,2]=0.5; Theta[3,3]=0; Theta[4,4]= -0.5; Theta[5,5]= 0.5;
Theta[1,2]=Theta[2,1]=1; Theta[1,4]=Theta[4,1]=1; Theta[2,3]=Theta[3,2]= -1;
numSamples=1000; burnIn=100; skip=1;
simData = BMNSamples(Theta, numSamples, burnIn, skip)
rhoVec = c(0.01, 0.02, 0.03)
exactPath = BMNExact(simData, rhoVec)
exactSingle = BMNExact.single(simData, 0.02)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.