tidyverse

Logistic Regression: Part I - Fundamentals

Likelihood theory Probit models were the first of those being used to analyze non-normal data using non-linear models. In an early example of probit regression, Bliss(1934) describes an experiment in which nicotine is applied to aphids and the proportion killed is recorded.

Logistic Regression: Part II - Varietal adoption dataset

Binary classifier using categorical predictor Let’s say we have two variable – survey response of farmer to willingness to adopt improved rice variety (in YES/NO) and them having been trained earlier about agricultural input management (in trained/untrained). Read in the data and notice the summary.

Making Summary Tables in R

Background General purpose tables Summary tables rtables package qwraps2 package gtsummary package Background Table output of R is one of the richest and satisfying to use feature. Rmarkdown format provides loads of package support to create, format, and present tables beautifully.

Tidytuesday: Claremont Run, X-men Characters

X men characters Data dictionary explore Table 1: Data summary Name Piped data Number of rows 308 Number of columns 9 _______________________ Column type frequency: character 8 numeric 1 ________________________ Group variables Variable type: character

String tip: complex pattern recognition

Background This post is all about examples and use cases. So…Let’s break a leg. Extract all words except last one using anchors and look arounds nasty_char <- c("I love playing wildly") # remove the last word 'wildly' stringr::str_extract(nasty_char, ".

String tip: vectorized pattern replacement

Example case Suppose you have a bunch of really filthy names, which makes you puke… You can go about fixing those with the help of stringi and stringr Lets say following character vector hosts those filthy names. filthy <- c("Grains %", "Moisture (gm/kg)", "Plant height (cm)", "White spaces", "White space (filth%)") filthy ## [1] "Grains %" "Moisture (gm/kg)" "Plant height (cm)" ## [4] "White spaces" "White space (filth%)" Now to get rid of the filth use string manipulation.

Expressing timestamp data in calendar

Unlike composing a text memos and keeping tracks of those, calendar graphics is a highly effective visual aid to taking notes and summarizing them. Well, we all have used calendar, one way or the other, in our lifetimes.

Grade X result

h1.title { font-size: 50px; color: DarkRed; text-align: center; } h4.author { /* Header 4 - and the author and data headers use this too */ font-size: 18px; font-family: "Times New Roman", Times, serif; color: DarkRed; text-align: center; } h4.

Tidyverse and tidbits

Ideas surrounding tidy evaluation quote() and eval() Why quote at-all Resolved messy data with tidy evaluation List behavior Using pmap to perform list operations inside a dataframe Apply a function to certain columns only, by rows Do any arbitrary operation Using dplyr functions inside your own functions Effiecient ways to operate on list Binds each element as row but third element is list Produces rowbinding for dataframe but doesn’t work with list elements Tibble and map data to list column in isolation Modeling, exploration, summary extraction and visualization examples using dplyr verbs.