- Home
- Tag: R
Posts tagged R
Tag: R
How to perform the MANOVA test in R?
Feed: R-bloggers. Author: DataScienceTutor. [This article was first published on datasciencetut.com, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. The post How to perform the MANOVA test in R? appeared first on – How to perform the MANOVA test in R?. when there are several response variables, a multivariate analysis of variance can be used to examine them all at once (MANOVA). This article explains how to use R to compute manova. For ... Read More
Two-Way ANOVA Example in R-Quick Guide
Feed: R-bloggers. Author: DataScienceTutor. [This article was first published on datasciencetut.com, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. The post Two-Way ANOVA Example in R-Quick Guide appeared first on – Two-Way ANOVA Example in R, the two-way ANOVA test is used to compare the effects of two grouping variables (A and B) on a response variable at the same time. Factors are another name for grouping variables. Levels are the several categories ... Read More
How to perform the Kruskal-Wallis test in R?
Feed: R-bloggers. Author: DataScienceTutor. [This article was first published on datasciencetut.com, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. The post How to perform the Kruskal-Wallis test in R? appeared first on . How to perform the Kruskal-Wallis test in R, when there are more than two groups, the Kruskal-Wallis test by rank is a non-parametric alternative to the one-way ANOVA test. It extends the two-samples Wilcoxon test. When the assumptions of the ... Read More
M.R. Asks 3 Questions: Siddharth Lunawat, CEO & Co-Founder, Hammoq

Feed: Sand Hill Group. Author: Clare Christopher. Siddharth “Sid” Lunawat is CEO and co-founder of Hammoq Inc., a company that automates the ecommerce process for returned item resale and used goods. In the face of an exploding market for overstocked, returned and used goods, where the fashion resale market alone is expected to reach $26 billion in 2022, Hammoq is reimaging “recommerce.” By using artificial intelligence and machine learning to close the labor gap challenge, Hammoq is overcoming industry barriers which have traditionally limited the product identification, valuation and marketplace listing process. M.R. Rangaswami: What is recommerce and how is ... Read More
Rusty HTML Minifying In R with {rextendr}
Feed: R-bloggers. Author: hrbrmstr. [This article was first published on R – rud.is, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. In my M-F newsletter today I mentioned an awesome Rust-based HTML/JS/CSS minifier library that also include batteries for a few other languages. There was no R port, so I made one using {rextendr}. The {rextendr} package makes is as easy to use Rust code in R packages as {Rcpp} does C/C++ code ... Read More
5 Key Data Visualization Principles Explained – Examples in R
Feed: R-bloggers. Author: Dario Radečić. Data visualization can be tricky to do right. There are a ton of key principles you need to be aware of. Today we bring you 5 best practices for visualizing data with examples in R programming language. Incorporate these key R data visualization principles into your toolset to improve your data storytelling. After reading, you’ll know how to produce publication-ready charts that won’t leave users questioning the data or the logic. You’ll know how to use ggplot2 and plotly for both static and interactive charts, and also how to get maximum interactivity out of your ... Read More
New Member Pfizer Joins R Consortium
Feed: R-bloggers. Author: R Consortium. [This article was first published on R Consortium, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. SAN FRANCISCO, May 2, 2022 – The R Consortium, a Linux Foundation project supporting the R Foundation and worldwide R community, today announced that Pfizer has joined as a Silver Member. “We have been using R for our work at Pfizer for over 10 years, but over the last few years we ... Read More
Comparing performances of CSV to RDS, Parquet, and Feather file formats in R
Feed: R-bloggers. Author: tomaztsql. [This article was first published on R – TomazTsql, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. From the previous blogpost:– CSV or alternatives? Exporting data from SQL Server data to ORC, AVRO, Parquet, Feather files and store them into Azure data lake we have created Azure blob storage, connected secure connection using Python and started uploading files to blob store from SQL Server. Alongside, we compared the performance of ... Read More
Color-Swapping Film Palettes in R with imager, ggplot2, and kmeans
Feed: R-bloggers. Author: Mark White. [This article was first published on Mark H. White II, PhD, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. I like visual arts, but I’m moderately colorblind and thus have never been great at making my own works. When I’m plotting data and need colors, my standard procedure is having a website generate me a color palette or finding a visually pleasing one someone else has made and ... Read More
Key Rate Duration using R code
Feed: R-bloggers. Author: sang-heon lee. #========================================================## Quantitative ALM, Financial Econometrics & Derivatives # ML/DL using R, Python, Tensorflow by Sang-Heon Lee ## https://kiandlee.blogspot.com#——————————————————–## Key Rate Durations#========================================================#graphics.off(); rm(list = ls())#=======================================================# read data#=======================================================str.zero – “matm zero 12 0.022 24 0.030 36 0.040 48 0.046 60 0.050 72 0.052 84 0.053 96 0.053 108 0.053 120 0.054″df – read.table(text = str.zero, header = TRUE)v.key_matm – df$matm # maturities for key ratesnkey – length(v.key_matm)# linear interpolation of zero ratesf_interpol – approxfun(df$matm, df$zero, rule = 2)# fill rates between key rates by 6M tenormatm = seq(6,120,6)df.sa – data.frame(matm = matm)nobs – length(matm)df.sa$zero – f_interpol(matm)# 10Y YTMYTM10 – 0.0527780789520333CPN10 – YTM10 # 10Y coupon = par yield rate#=======================================================# read data#=======================================================# rate shift : 0.0001 is preferabledr = 0.0001# make a table of dr for each key ratesfor(n in 1:nkey) { df.sa – cbind(df.sa, NA) colnames(df.sa)[2+n] – as.character(v.key_matm[n]) key_matm – v.key_matm[n] # set dr to the same key maturity # set 0 to other key rates # set NA to rates between key rates for(i in 1:nobs) { matmi – df.sa$matm[i] if(matmi == key_matm) { df.sa[i,2+n] – dr } else if (matmi %in% v.key_matm){ df.sa[i,2+n] – 0 } } # rates between key rates is linearly interpolated f_interpol – approxfun(matm, df.sa[,2+n], rule = 2, na.rm = TRUE) df.sa[,2+n] – f_interpol(matm)}# p0zero – df.sa$zeroP0 – sum((YTM10/2)/(1+zero/2)^(matm/6)) + 1/(1+zero[nobs]/2)^(matm[nobs]/6)# all the key rate shiftszerou – zero + rowSums(df.sa[,1:nkey+2])zerod – zero – rowSums(df.sa[,1:nkey+2])# effective duration : traditionalPu – sum((YTM10/2)/(1+zerou/2)^(matm/6)) + 1/(1+zerou[nobs]/2)^(matm[nobs]/6)Pd – sum((YTM10/2)/(1+zerod/2)^(matm/6)) + 1/(1+zerod[nobs]/2)^(matm[nobs]/6)ED – (Pd – Pu)/(2*P0*dr)# Key rate duationsdf.KRD – data.frame(matm = df$matm, ED = NA)for(n in 1:nkey) { # key rate shifts zerou – zero + df.sa[,2+n] zerod – zero – df.sa[,2+n] # effective duration : KRD Pu – sum((YTM10/2)/(1+zerou/2)^(matm/6)) + 1/(1+zerou[nobs]/2)^(matm[nobs]/6) Pd – sum((YTM10/2)/(1+zerod/2)^(matm/6)) + 1/(1+zerod[nobs]/2)^(matm[nobs]/6) df.KRD[n,2] – (Pd – Pu)/(2*P0*dr)}df.KRD# check if sum of KRDs is equal to effective durationdrsum(df.KRD$ED)ED ... Read More
Recent Comments