Posts Tagged ‘ code ’

Announcing boolean3 (beta)

January 24, 2012
By

After entirely too long, I am happy to announce the beta release of boolean3, an R package for modeling causal complexity. The package can be downloaded at the following links: Unix/Linux: boolean3_3.0.20.tar.gz Windows: boolean3_3.0.20.zip (Please let me know if you have any … Continue reading

Read more »

Doing Bayesian Data Analysis now in JAGS

January 3, 2012
By

Around Christmas time I presented my first impressions of Kruschke’s Doing Bayesian Data Analysis. This is a very nice book but one of its drawbacks was that part of the code used BUGS, which left mac users like me stuck. … Continue reading

Read more »

Graphing Twitter friends/followers with R (updated yet again)

December 22, 2011
By

Those of you following my occasional updates here know that I have previously posted code for graphing Twitter friend/follower networks using R (post #1. post #2). Kai Heinrich was kind enough to send me some updated code for doing so using a newer version of the extremely useful twitteR package. His very crisp, yet...

Read more »

R pitfall #3: friggin’ factors

December 15, 2011
By

I received an email from one of my students expressing deep frustation with a seemingly simple problem. He had a factor containing names of potato lines and wanted to set some levels to NA. Using simple letters as example names … Continue reading

Read more »

Book shoppin’…

November 24, 2011
By
Book shoppin’…

I honestly have no book on R programming. In fact I have not a single book on programming at all (my coding proves that ;x). I am pretty sure that I am gonna order (just did!) that book. You can get a look of Matloff’s text here (= pdf for ya)

Read more »

Using neural network for regression

November 17, 2011
By
Using neural network for regression

Artificial neural networks are commonly thought to be used just for classification because of the relationship to logistic regression: neural networks typically use a logistic activation function and output values from 0 to 1 like logistic regression. ...

Read more »

Train neural network in R, predict in SAS

November 11, 2011
By
Train neural network in R, predict in SAS

This R code fits an artificial neural network in R and generates Base SAS code, so new records can be scored entirely in Base SAS. This is intended to be a simple, elegant, fast solution. You don’t need SAS Enterprise Miner, IML, or any other spe...

Read more »

Confidence interval diagram in R

October 19, 2011
By
Confidence interval diagram in R

This code shows how to easily plot a beautiful confidence interval diagram in R. First, create a data frame (R’s representation of a table) with three columns. There are two rows for two confidence intervals, but you can have as many rows as you ...

Read more »

Lattice when modeling, ggplot when publishing

October 17, 2011
By
Lattice when modeling, ggplot when publishing

When working in research projects I tend to fit several, sometimes quite a few, alternative models. This model fitting is informed by theoretical considerations (e.g. quantitative genetics, experimental design we used, our understanding of the process under study, etc.) but … Continue reading

Read more »

Model decision tree in R, score in Base SAS

October 11, 2011
By
Model decision tree in R, score in Base SAS

This code creates a decision tree model in R using party::ctree() and prepares the model for export it from R to Base SAS, so SAS can score new records. SAS Enterprise Miner and PMML are not required, and Base SAS can be on a separate machine from R be...

Read more »

Sponsors