Skip to main content

Posts

Showing posts from December, 2016

RQuantlib installation in Windows (RQuantLib version 0.4.2)

The RQuantLib installation in Windows is quite straight forward. Download the windows binaries for either devel or release from here https://CRAN.R-project.org/package=RQuantLib Extract the files and copy the RQuanlib folder into the library folder of your R installation E:\R\R-3.1.3\library Once you copy it there fire up RStudio and when you run > library(RQuantLib) QuantLib version 1.6.2 detected which is older than 1.7. Intra-daily options analytics unavailable with that version. Warning message: package ‘RQuantLib’ was built under R version 3.3.1     The version number is older here because I think the CRAN windows binary upload did not make it in time with the QUantlib version 1.8.0. Running getQuantLibVersion will give you the version     > getQuantLibVersion() [1] "1.6.2"

Regression modelling in practice - Week 1 - Writing About Your Data

Week 1 asks to describe the data management steps taken for the dataset selected by describing 1) the sample, 2) the data collection procedure, and 3) a measures section describing the variables and how its been managed to address the research question. The sample The sample dataset being used for the study is the gapminder dataset. This dataset consists of data on 213 countries. Looking at the sample based on incomeperperson a substantial portion of the countries have income below $10000 (N=143; 66%) and a small percentage above $30000 (N=16; 7.5%). The oilperperson has a substantial portion of country data missing (N=150;70%). Barring this most of the other non missing data have countries (N=51;24%) consuming less than 2 tonnes per year per person. The frequency distribution of the polityscore variable shows that most of the countries are highly democratic i.e. score > 5 score (N=97;45%). The armedforces category shows 23% of the data ...

Data Analysis Tools - Week 4 - Testing a Potential Moderator

Week 4 asks to test the relationship between two variables with the dependence of a moderator. In this program I try to see the influence of the moderator variable democracy score over the relationship between the two variables incomeperperson and oil consumption. Program LIBNAME mydata "/courses/d1406ae5ba27fe300 " access=readonly; DATA new; set mydata.gapminder; format democracycategory $25.; /* Democracy score categorisation */ if polityscore le -5 then democracycategory = 'Tyranny\Autocratic'; else if polityscore lt 6 then democracycategory = 'partly democratic'; else if polityscore ge 6 then democracycategory = 'highly democratic'; /* Insert meaningful lables to the variables */ label country="country" oilperperson="Oil per person" incomeperperson="Income per person ($)(based on 2010 dollar exchange rate)" democracycategory="Democracy category" polityscore="Democracy score...