### Installation Source: https://github.com/vpparkkinen/frscore/blob/main/README.md Install the latest version of the frscore package from CRAN. ```r # latest version on CRAN install.packages("frscore") ``` -------------------------------- ### Usage Examples Source: https://github.com/vpparkkinen/frscore/blob/main/README.md Demonstrates various functionalities of the frscore package, including running reanalysis series, visualizing results, and comparing different submodel definitions. ```r library(frscore) # run a reanalysis series on a data set simulated from an # arbitrary target, and calculate fr-scores. frsc <- frscored_cna(selectCases("A+B+F*g<->R")) frsc # visualize results from above plot_submodel_network(frsc) # just run a reanalysis series rean_cna(ct2df(selectCases("A+B+F*g<->R")), attempt = seq(1, 0.7, -0.1)) # frscore a preexisting collection of models res <- rean_cna(selectCases("A+B+F*g<->R"), attempt = seq(1, 0.7, -0.1)) res <- do.call(rbind, res) fr <- frscore(res[,2]) fr # causal submodel vs. vanilla cna submodel target <- "(A+B<->C)*(C+D<->E)" candidate <- "A+B<->E" causal_submodel(candidate, target) is.submodel(candidate, target) ``` -------------------------------- ### Example Usage of frscored_cna Source: https://github.com/vpparkkinen/frscore/blob/main/tests/testthat/_snaps/frscored_cna.md Demonstrates how to call the frscored_cna function with specific parameters and data. ```R frscored_cna(d.jobsecurity, fit.range = c(0.8, 0.7), granularity = 0.1, outcome = "JSR") ``` -------------------------------- ### Model Score Examples Source: https://github.com/vpparkkinen/frscore/blob/main/tests/testthat/_snaps/frscored_cna.md Examples of model scoring with different causal relationships and their corresponding scores. ```R A*c+A*D+B*C<->E ``` ```R A*D+B*C<->E ``` ```R A+B*C<->E ``` ```R A+B<->E ``` ```R A*c+B*C<->E ``` ```R A*B+A*D+B*C<->E ``` ```R A*D+B*C<->E ``` ```R A*B+A*D+B*C<->E ``` ```R A*D+B*C<->E ``` ```R A*B+A*c+A*D<->E ``` ```R A+B<->E ``` ```R A<->E ``` ```R A+C*D<->E ``` ```R E<->A ``` ```R (E<->A)*(B+C*D<->E) ``` ```R c*E+D*E<->A ``` -------------------------------- ### frscore with ss2 Source: https://github.com/vpparkkinen/frscore/blob/main/tests/testthat/_snaps/frscore.md Example of calling frscore with a dataset named ss2, showing processing details and model scores. ```r frscore(ss2) ``` -------------------------------- ### frscore function usage with multivariate data Source: https://github.com/vpparkkinen/frscore/blob/main/tests/testthat/_snaps/frscore.md Example of calling the frscore function with multivariate data and displaying the output. ```r frscore(mv_all[[1]][[1]], dat = mvdat) ``` -------------------------------- ### frscore with ss[1] Source: https://github.com/vpparkkinen/frscore/blob/main/tests/testthat/_snaps/frscore.md Example of calling frscore with a subset of a dataset (ss[1]), showing processing details and model scores. ```r frscore(ss[1]) ``` -------------------------------- ### frscore with ss2[1:2] Source: https://github.com/vpparkkinen/frscore/blob/main/tests/testthat/_snaps/frscore.md Example of calling frscore with a specific slice of a dataset (ss2[1:2]), showing processing details and model scores. ```r frscore(ss2[1:2]) ``` -------------------------------- ### Program Notice Template Source: https://github.com/vpparkkinen/frscore/blob/main/LICENSE.md A template for the notices to be attached to a program to make it free software under the GNU Affero General Public License. ```text Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . ``` -------------------------------- ### frscored_cna function call Source: https://github.com/vpparkkinen/frscore/blob/main/tests/testthat/_snaps/frscored_cna.md Example of calling the frscored_cna function with specified arguments. ```R frscored_cna(d.error, verbose = TRUE, inus.only = TRUE) ``` -------------------------------- ### frscored_cna function call Source: https://github.com/vpparkkinen/frscore/blob/main/tests/testthat/_snaps/frscored_cna.md Example of calling the frscored_cna function with a data object. ```R frscored_cna(d.pban) ```