The MGS Blog

Tuesday, April 18, 2017

R and Harvard's PH525.1x MOOC

Having enrolled "Statistics and R for the Life Sciences" run on EdX by Harvard (MOOC module PH525.1x)...
Some notes and pointers for R; introductory and tutorials for basic statistical treatment of quantitative data.
As an aside comment, would you believe that running R commands and generating plots, makes data fun and surprising? Or is it just me? At least it's something different, perhaps more interactive than doing the same thing in a spreadsheet. Did I say it felt like fun already? Perhaps when generating those beautiful little graphs automatically?

Definitions: p-value, confidence interval, random variables, null distributions, central limit theorem, inference tests like t-test, association test, permutation test.

Getting started with R. The software first.
Download and install R from CRAN http://cran.r-project.org/
Download and install R Studio for the desktop (the same people also run/operate Shiny) http://www.rstudio.com/products/rstudio/download/ 

Q: Am I on the latest version of R?
Check you're on the latest version, if not download the latest package (on MacOS use Safari).
Run md5 checker from the terminal and verify.
md5 R-3.2.2.pkg MD5 (R-3.2.2.pkg) = dd8999f50c5d4e392832797d091642db
Then check the installation works, run R.app, type version at the R console to verify the expected installed version is running.

Q: Same: am I on the latest version of R?
Check you're on the latest version, if not download the latest package (on MacOS use Safari).
md5 RStudio-0.99.489.dmg MD5 (RStudio-0.99.489.dmg) = 05cf866b07df6552583f98314ed09d38
Again, check the installation works, run RStudio and go to RStudio>About RStudio to see the version window.

Links for learning.
Pointers to external material (from the EdX course)
The underlying concepts.
  • Vectors (single or multi-element row, single data type)
  • Matrix (multi-element array, single data type)
  • Lists (a vector of mixed data types, organised into named components $xxx)
  • Data Frames (an array-like form of R list,  a matrix of mixed data types in which each column of the matrix corresponds to a vector. Can be addressed different ways, by named component or index location)
Matrix commands
> m <- rbind(c(1,4),c(2,2))  # rbind( ) is a function for row bind. cbind( ) is the corresponding function for column bind.
> m
    [,1] [,2]
[1,]   1    4
[2,]   2    2
> m %*% c(1,1)  # matrix multiplication operator
    [,1] 
[1,]   5
[2,]   4
> m[1,2] # return value at matrix index location 1,2
[1] 4
> m[2,2] # return value at matrix index location 2,2
[1] 2
> m[1,] # row 1, shows how to extract submatrices from a matrix
[1] 1  4
> m[,2] # column 2, shows how to extract submatrices from a matrix
[1] 4  2

A series of setup steps in R/RStudio (and using stuff at https://github.com/genomicsclass/dagdata):
> install.packages("devtools")
> library(devtools)
> install_github("genomicsclass/dagdata")
> install_github("ririzarr/rafalib")
> 1:10
    [1]  1  2  3  4  5  6  7  8  9 10
> x <- 1:10
> y <- rnorm(10)
> plot(x,y)
> ? read.csv
> dat <- read.csv("femaleMiceWeights.csv")
You might need to set the working directory to get read.csv to find the right file


> class(dat)
> head(dat)
> dim(dat)
> dat$order
> colnames(dat)
> dat$sleep_total
> c(dat$sleep_total, 1000)
> plot(dat$brainwt, dat$sleep_total)
> plot(dat$brainwt, dat$sleep_total, log="x")
> summary(dat)
> dat[c(1,2),]
> dat[ dat$sleep_total > 18, ]
> dat$sleep_total[ c(1,2)]
> dat[dat$sleep_total > 18,6]
> mean(dat[ dat$sleep_total > 18,6 ])
> dat <- read.csv("msleep_ggplot2.csv")
> which(dat$sleep_total>18)
> dat$sleep_total[which(dat$sleep_total>18)]
> dat$sleep_total[22]
> which(dat$sleep_rem<3)
> which(dat$sleep_rem<3 & dat$sleep_total>18)
> sort(dat$sleep_total)
> order(dat$sleep_total)
> dat$sleep_total[order(dat$sleep_total)]
> rank(dat$sleep_total)
> rank(c(1,2,2,3))
> match(c("Cow", "Owl monkey", "Cheetah"), dat$name)
> idx=match(c("Cow", "Owl monkey", "Cheetah"), dat$name)
> dat[idx]

Q: Running a simple correlation analysis in R
Useful videos (link) (link2)
The presence and strength of a linear relationship or correlation between two quantitative variables can be tested by calculating the correlation coefficient (r) between the two variables.

> argentina<-read.csv('countries.csv')
> head(countries)
    country year gsli.total gsli.financial gsli.people u5_mortality_rate life_expectancy unemployment_rate
1 Argentina 2004       5.07           3.25        0.74                       17.9                       74.5   12.2
2 Argentina 2005       5.05           3.14        0.93                       17.1                       75.0   10.6
etc.

Run a correlation test between the two variables (vectors) we want to compare, i.e. countries$gsli.total and countries$unemployment_rate.

Q: Making a pairs plot to highlight possible correlations between multiple variables
Produce all possible pair-wise plots (link)
> names(countries)
[1] "country"                    "year"                  
[3] "gsli.total"                 "gsli.financial"        
[5] "gsli.people"                "u5mr_mortality_rate_median"
[7] "life_expectancy_from_birth" "GET_UR"                
> pairs(countries[,3:8])
pairs-plot for the countries dataset (for axes read x-y as illustrated gsli.total v gsli-fin)
By inspection the only variable without obvious possible correlation is gsli.total.

Learning online

Is Python a good language to learn programming?

A question regularly posed to Slashdot followers is "how to become a programmer?" or "what programming language is the best to learn?" There are no easy answers because it is not easy to learn to program nor is there one best language for learning to program or to program 'professionally'. However a broad consensus exists that Python is useful both as language for learning how to program and as a programming language in its own right suitable for developing serious software applications.

A terminal session driving my python program.


Learn Python The Hard Way (2nd Ed) by Zed A. Shaw is a sufficiently challenging yet productive step-wise set of exercises that you can use to gradually learn both how to wrangle your computer and how to program. You will learn that the answer is both out there (thanks search engines and people who post to blogs or groups) so long as you ask the question, and within you if you work hard enough to discover and understand why something doesn't work the way you expect it to work. You will find that docs.python.org is an essential resource for understanding the whats and whys of Python, and Wikipedia an aid for learning fundamental concepts.

What python course does google use? Google's own python class offers a well paced introduction to the language https://developers.google.com/edu/python/ (link)

Thursday, April 13, 2017

[guest lecture] Edna Hogan: NGOs, ICT, Tanzania, Africa

Our guest lecture by Edna Lyatuu Hogan 12:00pm midday Tuesday 11th Apr in N303. The topic was how NGOs Revolutionise ICT for Development; talking about technology and innovation in Tanzania.

Vikas, Edna and Anna at the start of the lecture.
Edna concluded by setting a challenge, to support social enterprises in Tanzania which benefit from the sales of her book "POEMS for the Soul and the Bold Minds!: Life and Love Poems" on Kindle.

Saturday, April 1, 2017

Adam Grant on "are you a giver or a taker?"

Adam Grant's take on the false economy of performance review, firing underachievers, and all that other bad stuff that happens to good people.


I suppose it's no accident that the constructs he talks about and in his research include help-givers, help-seekers, givers, takers.

Friday, March 31, 2017

An update on the programme - 31 March 2017

This week's Outsourcing/Offshoring class was held off-site in the Bank of Ireland Workbench, Grand Canal Square. It ended up being both a reminder of the realities of the work scene in high-tech but also an unexpected opportunity to try out some of that cutting edge technology when we got to play with a HTC Vive VR for meetings. Here are some photos from the lecture.

Class off-site Grand Canal Dock
https://www.flickr.com/photos/44739231@N05/sets/72157678760408683

We started much earlier than usual (8am) which, I'm sure most of the class were hoping, was a once-off. BoI are building a virtuous cycle of infrastructure, knowledge and community for incubating ideas to embryonic firms. The Workbench is one of a growing number of casual spaces that entrepreneurs can use for meetings, for hot-desking, to work and collaborate. The space is available on a first come first served basis. You get to use the WiFi, coffee/tea facilities, whiteboards and benches.

After the lecture, I was thinking back on that provocation in class, that we had missed the point of the reading (Vlaar et al, 2008). The point being that we too easily fall into the trap of seeing explanations and solutions to business problems in terms of the obvious things: needing tighter contracts, fixed milestones, more communication, better communication, shared understanding, making sense of situations etc. when in fact the obvious explanations are pretty hollow. Taking a closer look at the article we can see that some insights and better labels, better ways of talking about the challenge. We need their language to make these points and also to make the situation more meaningful. Three key concepts "sensegiving, sensedemanding, and sensebreaking" are a really novel way of approaching how to make the most of experience asymmetries. It is differences that end up creating new value even as they might also create problems.
"...understandings of requirements do not exist “out there” in the minds of stakeholders... they are dynamically constructed and negotiated during interaction processes" (Vlaar et al, 2008:pp239-8)
So now, with this new rich language to describe (and manage) the interaction process we really can make it happen.

All the best
Allen

Reference:
Vlaar, P. W. L., Fenema, P. C. v., and Tiwari, V. (2008). Cocreating understanding and value in distributed work: how members of onsite and offshore vendor teams give, make, demand, and break sense. MIS Quarterly, 32(2):227–255.

Monday, March 13, 2017

Meetups and networking

Industry Meetups and networking opportunities abound in Dublin. I've mentioned these in class. I encourage you to participate in the local Dublin startup and business support environment,:

http://www.technology-ireland.ie/ (search for TechBrew)

http://www.ixd.ie/

https://www.meetup.com/

The Dublin Meetup board is extremely active and offers great opportunities for networking.

Friday, March 3, 2017

'Kidzania: The power of Play'

Mexico-Ireland Business Lecture in association with IPADE
GUEST SPEAKER - Mr. Xavier López Ancona
'Kidzania: The power of Play'
The fun of work!
Xavier López Ancona founded KidZania, one of the fastest growing kid’s hands-on entertainment brands in the world on 1997. It is a kids’ city that combines inspiration, fun and learning through realistic role play for children 4-14. Kids independently explore a safe and contained 80,000 square foot kid-sized city with over 60 exciting careers that they can try out as they learn about the inner-workings of a city and the concept of managing money. Each ultra-realistic experience is designed to empower kids, giving them the confidence to be their best selves, and inspiration to be great global citizens. With 24 locations in 19 countries and rapidly growing globally, KidZania is one of the most inventive kid’s edutainment concepts in the world. www.kidzania.com

Date: 8 Mar 17
Time: 11.30am - 12.30pm
Venue: Laurence Crowley Boardroom
Location: UCD Smurfit School, Carysfort Ave, Blackrock, Dublin

See invitation to register 

Thursday, March 2, 2017

NSAI Seminar: Standards and Markets.

NSAI's Kierán Cox talking about standards and the role in product design and market making.
[guest lecture] Kierán Cox (12:00pm midday Tuesday 28th Feb in LT1) - NSAI; Standards in High-Tech and the Standards Process

Tuesday, February 21, 2017

Talk - Inside the big blue bird



Tuesday, February 14, 2017

StaffVirtual - Philippines

StaffVirtual provide BPO and ITO based in the Philippines. These are specialist services delivered digitally by highly educated, skilled, talented, committed, people based in the Philippines.
What capabilities make these services valuable and attractive to distant clients?
What are they doing that enables them to ‘fit’ or ’match’ the client?

http://www.staffvirtual.com/

Monday, February 13, 2017

IAM 2017 Call For Papers

The 2017 Irish Academy of Management (IAM) Conference is being hosted by Queen’s Management School, Queen’s University Belfast, from the 30th August to the 1st September, 2017.

Abstracts will be double peer-reviewed. Submission details and further information about the conference can be found on the conference website.
www.iamireland.ie

We look forward to welcoming you to Belfast!
Dr Geoff Simmons and Dr Kristel Miller
Conference Chairs, Queen’s Management School
E-mail: IAM2017@qub.ac.uk

Wednesday, February 8, 2017

Seminar - TestReach; the Online Testing and Supervision Company

[guest lecture] Louella Morton and Brian Mc Hugh (12:00pm midday Tuesday) 7th Feb - TestReach - Online Testing and Supervision. A talk on TestReach's corporate development, philosophy, history, organisation, approach to product management and product design. http://www.testreach.com/


TestReach Seminar

Tuesday, February 7, 2017

Version1 Seminar 2017

Version1 Seminar
Peter Smyth: Head of Managed Services, Version 1


[guest lecture] Peter Smyth (5:15pm Monday 6th Feb in room N303) - Verison1 the Irish Consulting, Solutions and Outsourced Managed Services Company. Procurement stories and Agile serverless technologies. http://www.version1.com/

Thursday, February 2, 2017

PMIA Seminar

PMIA Seminar
Ready for the value chain exercise.


Look out for the value chain exercise captured in stop-motion.
PMIA : Proudly Made In Africa: value chain exercise from Allen Higgins on Vimeo.

Monday, January 23, 2017

Country Selection and IT Outsourcing - Talk

An open invitation to "Country Selection and IT Outsourcing" - all welcome. Please forward.
Speaker: Allen Higgins
When: Midday (12:00-12:30), Tuesday 24th January, 2017.
Where: Lecture Theatre 1, UCD Smurfit Graduate School of Business, Blackrock, Dublin, Ireland.

In this talk we ask; are offshore IT outsourcing (ITO) and IT mediated business process outsourcing (BPO) linked with social conditions in supplier countries? We compare international outsourcing indices produced by consulting firms, with country-level social data obtained from international data sets. We find that two country attractiveness factors (financial attractiveness and people & skills) are correlated with three international data sets (child mortality rate, life expectancy and unemployment). We conclude that higher commercial attractiveness raking is associated with lower socio-economic performance; in effect, poverty makes some destinations appear more financially attractive.

In light of these findings further investigations are proposed to better understand the impacts of offshore outsourcing activity in destination regions. This involves investigating linkages between country attractiveness for ITO/BPO activity and country social performance and how they change over time; and to seek additional sources of reliable international economic data for ITO/BPO activity.

Previously presented at the 27th Australasian Conference on Information Systems 2016.

Download a copy of the paper from ResearchGate. https://www.researchgate.net/project/Impact-of-IT-Outsourcing