<jupyter_start><jupyter_text>Our later analysis will motivate the following "corrected" model.  In order to run all the sampling in a single worksheet, we include this code here.<jupyter_code>fixed_base_model_name <- file.path(example_path, "models/earnings_vary_si_corrected.stan")
fixed_model_name <- GenerateSensitivityFromModel(fixed_base_model_name)
fixed_model <- stan_model(paste(fixed_model_name, "_generated.stan", sep=""))
fixed_stan_sensitivity_list <- GetStanSensitivityModel(fixed_model_name, stan_data)
fixed_stan_data <- new.env()
source(data_path, local=fixed_stan_data)
fixed_stan_data <- as.list(fixed_stan_data)
fixed_stan_data$mu_a1_scale <- 10
fixed_stan_data$mu_a2_scale <- 10

fixed_stan_data$sigma_a1_scale <- 10
fixed_stan_data$sigma_a2_scale <- 10

fixed_sampling_result <- sampling(
  model, data=fixed_stan_data, iter=iters,
  chains=1, control=list(adapt_delta=adapt_delta))
fixed_sens_result <- GetStanSensitivityFromModelFit(fixed_sampling_result, stan_sensitivity_list)
fixed_tidy_results <- GetTidyResult(fixed_sens_result)
refit_filename <- file.path(example_path, "earnings_vary_si_refit_results.Rdata")
cat("Saving to\n", refit_filename, "\n")
save(model_name, tidy_results, stan_data, fixed_stan_data,
     perturbed_df, summary_list,
     sampling_result,
     sampling_result_list,
     fixed_sampling_result, fixed_tidy_results,
     sampling_time, sens_time, refit_time,
     hyperparam_name, hyperparam_vals,
     file=refit_filename)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08964143426294821, 'fraction_numerical': 0.008632138114209827, 'mean_word_length': 8.023952095808383, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '334960', 'license': 'Apache-2.0', 'n_tokens_mistral': 555, 'n_tokens_neox': 511, 'n_words': 85, 'path': 'examples/earnings_vary_si/Sampling_earnings_vary_si.ipynb', 'repo_name': 'rgiordan/StanSensitivity', 'size': '1506'}