R code

Do you still have time to sleep ?

June 11, 2012 | arthur charpentier

Last week, @3wen (Ewen) helped me to write nice R functions to extract tweets in R and build datasets containing a lot of information. I've tried a couple of time on my own. Once on tweet contents, but it was not convincing and once on the activit... [Read more...]

Using SNA in Predictive Modeling

April 10, 2012 | Matt Bogard

In a previous post, I described the basics of social network analysis. I plan to extend that example here with an application in predictive analytics. Let's suppose we have the following network (visualized in R)Suppose we have used the igraph package ...
[Read more...]

Regression via Gradient Descent in R

November 27, 2011 | Matt Bogard

In a previous post I derived the least squares estimators using basic calculus, algebra, and arithmetic, and also showed how the same results can be achieved using the canned functions in SAS and R or via the matrix programming capabilities offered by ...
[Read more...]

Basic Econometrics in R and SAS

November 27, 2011 | Matt Bogard

Regression Basicsy= b0 + b1 *X  ‘regression line we want to fit’The method of least squares minimizes the squared distance between the line ‘y’ andindividual data observations yi. That is minimize: ∑ ei2 = ∑ (yi - b0 -  b1 Xi...
[Read more...]

Gradient Descent in R

November 27, 2011 | Matt Bogard

In a previous post I discussed the concept of gradient descent.  Given some recent work in the online machine learning course offered at Stanford,  I'm going to extend that discussion with an actual example using R-code  (the actual code...
[Read more...]

Elements of Bayesian Econometrics

September 16, 2011 | Matt Bogard

 posterior = (likelihood x prior) / integrated likelihoodThe combination of a prior distribution and a likelihood function is utilized to produce a posterior distribution.  Incorporating information from both the prior distribution and the likelihood function leads to a reduction in variance and an improved estimator. As n→ ∞ the likelihood centers over the ...
[Read more...]

QTL Analysis in R

August 13, 2011 | Matt Bogard

See also: Part 1: QTL Analysis and Quantitative Genetics  Part 2: Statistical Methods for QTL Analysis The 'qtl' package in R allows you to implement QTL analysis using the methods I've previously discussed. The code below is adapted from Broman... [Read more...]

R Program Documentation Template

August 13, 2011 | Matt Bogard

# ------------------------------------------------------------------ # |PROGRAM NAME: # |DATE: # |CREATED BY: MATT BOGARD # |PROJECT FILE: # |---------------------------------------------------------------- # | PURPOSE: ...
[Read more...]

BSE Bhavcopy with Delivery Quantity

July 24, 2011 | Market Analyzer

One of my TI forum members IV had a requirement for BSE Quotes along with Delivery Quantity. This made me implement "merge" function of R coding (thanks to the great work done by people behind various packages and guidance available on R Mailing lists)...
[Read more...]

Extracting EOD Data from BSE

July 19, 2011 | Market Analyzer

Earlier, I had worked around to download Bhavcopy from NSE. Now, I would make a similar attempt to download the BSE BhavcopyObjective: Download Bhavcopy (Equity) from http://www.bseindia.com and save only relevant columns Date, Symbol, Name, Open, High...
[Read more...]

Extracting EOD Data from NSE

July 19, 2011 | Market Analyzer

My prime interest being the Indian financial markets, the first step would be to get the data to play around. NSE India provides EOD of data as bhavcopies. The same are stored as zipped files at their servers. Downloading them one by one for a larger t...
[Read more...]

%EXPORT_TO_R SAS Macro Code

May 6, 2011 | Matt Bogard

The SAS Analysis blog post 'A macro calls R in SAS for paneled 3d plotting' influenced my macro coding.   The following macro call: %EXPORT_TO_R(DATA = YOURDATA)  exports the SAS data set 'YOURDATA' as .csv and produces the R code for se...
[Read more...]

How to upgrade R on windows 7

April 15, 2011 | Tal Galili

Background – time to upgrade to R 2.13.0 The news of the new release of R 2.13.0 is out, and the R blogosphere is buzzing. Bloggers posting excitedly about the new R compiler package that brings with it the hope to speed up our R code with up to 4 times improvement. So it ... [Read more...]
1 2 3

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)