# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#' To get the solution for the weights from the weights on each
#' predictor variable and the X scaled matrices for the treated unit
#' and control units
#'
#' @title solution for region weights
#' @param solution_v the weighte on each predictor
#' @param X0_scaled scaled matrix of control units
#' @param X1_scaled scaled matrix for the treated unit
#' @return A vector with the solution with the regional weights
#' @author Chandler Lutz
#'
solution_w_cpp <- function(solution_v, X0_scaled, X1_scaled) {
.Call('SynthHelpers_solution_w_cpp', PACKAGE = 'SynthHelpers', solution_v, X0_scaled, X1_scaled)
}
#' The Optimization function for the synthetic control implemented
#' using Rcpp
#'
#' @title Synth Optimization func for predictor variable weights
#' @param variables_v The weights on the Synth predictor variables
#' @param X0_scaled scaled matrix of control units
#' @param X1_scaled scaled matrix for the treated unit
#' @param Z0 matrix of outcome observations for the control units
#' @param Z1 matrix of outcome observations for the treated unit
#' @return the loss from the parameter optimizaiton
#' @author Chandler Lutz
#'
fn_v_cpp <- function(variables_v, X0_scaled, X1_scaled, Z0, Z1) {
.Call('SynthHelpers_fn_v_cpp', PACKAGE = 'SynthHelpers', variables_v, X0_scaled, X1_scaled, Z0, Z1)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.