Load libraries

-000|B|}“`r

What Happens to Options When a Stock Splits? | EDGE Investments
Image: edgeinvestments.org

library(tidyverse)
library(broom.mixed)
library(sjlabelled)
library(ggplot2)
library(ggstatsplot)

Load data

df <- read.csv(“~/Desktop/Grantham/Data_files/export_csv_T2S.csv”)

Process data

df <- df %>%
clean_names() %>%
drop_na() %>%
drop_na_condition(trimm = TRUE) %>%
mutate_everything(as.factor) %>%
select(-id)

Estimates

results <- df %>%
nest(-year) %>%
estimate(formula = plant_type_mutation_factor ~ land_quality * plant_type + condition + (1 | product),
model = “bayes”,
data = .,
estimate = “bayes”,
prior = normal(0, 1), #prior being assigned for (mu / tau)**2
mcmc = list(iter = 10000, thin = 10, burnin = 5000, chains = 4))

Extract tidy effect sizes and plot

tidy(results, effects = “fixed”) %>%
janitor::tidy_text(estimate) %>%
pivot_longer(cols = estimate:se) %>%
ggplot(aes(reorder(factor(term), -estimate),
estimate,
fill = term)) +
geom_col(show.legend = FALSE) +
theme_minimal() +
labs(x = NULL, y = expression(beta),
title = “Association Between Plant Type, Land Quality, and Plant Type x Land Quality Interaction & Plant Condition Plant Traits”) +
scale_fill_manual(values = c(“#66c2a5”, “#d6643c”, “#fc8d62”)) +
geom_hline(yintercept = 0, linetype = 2, color = “gray70”) +
geom_text(aes(label = ifelse(estimate > 0,
round(estimate, 2),
round(estimate, 2))),
nudge_y = .075,
size = 3.5,
color = “black”) +
coord_flip()

save

ggsave(“~/Desktop/Grantham/Figures/plant_type_mutation_factor_by_land_quality.png”, plot = last_plot(), width = 8, height = 6, units = “in”)

Option Strike Prices Explained | Options Trading For Beginners - YouTube
Image: www.youtube.com

Strike Options Trading

Strike Price in Options Trading: Calculation and How to Choose?
Image: navi.com


Read:  The Nitty-Gritty of Trading Options – A Comprehensive Guide

You May Also Like

Leave a Reply

Your email address will not be published. Required fields are marked *