Publications by JOHN OYAN NAIVEST
Introduction to Redington Immunization Modeling
INTRODUCTION This document presents a model for Redington immunization, a technique used by actuaries to manage interest rate risk by matching the duration of assets and liabilities. The analysis uses hypothetical Kenyan data, simulating cash flows for liabilities (e.g., pension payouts) and assets (e.g., government bonds). The goal is to ensur...
2542 sym 2 img 2 tbl
Financial Health of a Clinic
title: “Central Clinic Financial Analysis Report” author: “Oyan Naivest” date: “2025-01-26” output: flexdashboard::flex_dashboard: orientation: rows vertical_layout: fill toc: true # Table of Contents toc_float: true # Floating Table of Contents # Set global options for the document knitr::opts_chunk$set(echo = TRUE, warning = FALSE...
1149 sym R (15014 sym/29 pcs) 14 img
Binomial Distribution in R
set.seed(10) binomial_data <- rbinom(1000,100,0.3) binomial_data <- as.data.frame(binomial_data) names(binomial_data) <- c("data") #This code sets the seed for reproducibility and generates 1000 samples from a binomial distribution with n=100 and p=0.3 library(tidyverse) ## -- Attaching core tidyverse packages ------------------------ tidyverse...
10 sym R (3459 sym/6 pcs) 1 img
ggplot2
1 Learning Objectives By the end of this lesson you should be able to: Recall and explain how the {ggplot2} package for data visualization is based on a theoretical framework called the grammar of graphics. Name and describe the 3 essential components required for building a graph: data, aesthetics, and geometries. Write code to build a compl...
11125 sym 28 img
pivoting
1 Learning Objectives You will understand what a wide data format is, and what a long data format is You will know how to pivot long data to wide data using pivot_long() You will know how to pivot wide data to long data using pivot_wider() You have the intuition why the long data format is easier for plotting and wrangling 2 Packages 3 What...
8519 sym Python (11793 sym/38 pcs) 10 img
grouping, summarizing and plotting
Workshop 6: Grouping, Summarizing and Plotting JOHN OYAN NAIVEST 2023-08-15 1 Load packages and data To get started, load in the needed packages: {tidyverse}, {here}, {janitor}, and {esquisse}. Now, read the dataset into R. The data frame you import should have 880 rows and 22 columns. Remember to use the here() function to allow your Rmd to ...
3345 sym 1 img
Document
## Loading required package: pacman covid_well_being <- import("https://docs.google.com/uc?id=1QIzVc9xOwKbPJVZKZwNzWAAUe6MmOfBu&export=download", format = "csv", setclass = "tibble") head(covid_well_being) %>% select(respondent_id, survey_number, survey_time, fell_asleep_time, woke_up_time) ## # A tibble: 6 x 5 ## respondent_i...
24 sym Python (4920 sym/19 pcs) 2 img
Creating and Transforming Variables
Workshop 5: Creating and transforming variables JOHN OYAN NAIVEST 2023-08-10 Load packages and data To get started, load in the needed packages: {tidyverse}, {here}, and {esquisse}. pacman::p_load(tidyverse, here, esquisse) Now, let’s read the dataset into your RStudio environment. The data frame you import should have 142 rows and 9 columns...
4499 sym 2 img