December 2012

line width in R and in Illustrator

December 17, 2012 | Xianjun Dong

I've drawn figure in R with lwd=1, e.g.pdf('test.pdf')plot(1:10, type='o', lwd=2, axes=F)box(lwd=1, col='red')dev.off()And then you open the PDF in Illustrator, you will see the border width is 0.75pt, and the line is 1.5pt, which seems that the unit ... [Read more...]

Stan and RStan 1.1.0

December 17, 2012 | Bob Carpenter

We’re happy to announce the availability of Stan and RStan versions 1.1.0, which are general tools for performing model-based Bayesian inference using the no-U-turn sampler, an adaptive form of Hamiltonian Monte Carlo. Information on downloading and installing and using them is available as always from Stan Home Page: http://mc-stan....
[Read more...]

My R naming nemesis

December 17, 2012 | Derek Jones

When learning a new language I try to make an effort to write it like a native developer. R has one language feature that has been severely testing my desire to write like a native and this afternoon I realized that most of the people reading my code will also ... [Read more...]

Video: SQL queries in R using sqldf package

December 17, 2012 | Randy Zwitch

This video covers how to run SQL queries using the ‘sqldf’ package within R. This sqldf tutorial was part of a Keystone Solutions podcast discussion about data science and what skills beginning analysts should be learning to improve their skill set. The example files from this tutorial can be downloaded ... [Read more...]

Who are the pollinators? (with R plot)

December 17, 2012 | ibartomeus

I’ve been dreaming on writing a manuscript about who are the pollinators for a while, but it looks I’m not going to have the time soon, so here is an early draft of what the main figure should look like: It’s surprisingly … Continue reading → [Read more...]

A look at historical Value at Risk

December 17, 2012 | Pat

Historical Value at Risk (VaR) is very popular because it is easy and intuitive: use the empirical distribution of some specific number of past returns for the portfolio. Previously “The estimation of Value at Risk and Expected Shortfall” included an R function to estimate historical VaR. Generating portfolios A useful ... [Read more...]

True Significance of a T Statistic

December 17, 2012 | Wesley

The example is more of a statistical exercise that  shows the true significance and the density curve of simulated random normal data.  The code can be changed to generate data using either a different mean and standard deviation or a different distribution altogether. This extends the idea of estimating pi ... [Read more...]

Now I see it! K-means cluster analysis in R

December 17, 2012 | Markus Gesmann

Of course, a picture on a computer monitor is a coloured plot of x and y coordinates or pixels. Still, I was smitten by David Sparks' posts on is.r(), where he shows how easy it is to read images into R to analyse them. In two posts [1], [2] he replicates ... [Read more...]

High-Powered Statistical Computing On the iPad

December 17, 2012 | Justin Esarey

It's winter break… and as any academic knows, breaks are “a good time to get work done.” For the Christmas break, many of us have to travel home to see family members. One of the great privileges of being an academic is that you don't necessarily need to be in ... [Read more...]

Fractional Logit Model with Python

December 16, 2012 | statcompute

[This article was first published on Yet Another Blog in Statistical Computing » S+/R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. In [1]: import pandas as pd In [2]: import statsmodels.api as sm In [3]: data = pd.read_table('/home/liuwensui/Documents/data/csdata.txt') In [4]: Y = data.LEV_LT3 In [5]: X = sm.add_constant(data[['COLLAT1', 'SIZE1', 'PROF2', 'LIQ', 'IND3A']]) In [6]: # Discrete Dependent Variable Models with Logit Link In [7]: mod = sm.Logit(Y, X) In [8]: res = mod.fit() Optimization terminated successfully. Current function value: 882.448249 Iterations 8 In [9]: print res.summary() Logit Regression Results ============================================================================== Dep. Variable: LEV_LT3 No. Observations: 4421 Model: Logit Df Residuals: 4415 Method: MLE Df Model: 5 Date: Sun, 16 Dec 2012 Pseudo R-squ.: 0.04022 Time: 23:40:40 Log-Likelihood: -882.45 converged: True LL-Null: -919.42 LLR p-value: 1.539e-14 ============================================================================== coef std err z P>|z| [95.0% Conf. Int.] ------------------------------------------------------------------------------ COLLAT1 1.2371 0.260 4.756 0.000 0.727 1.747 SIZE1 0.3590 0.037 9.584 0.000 0.286 0.432 PROF2 -3.1431 0.739 -4.254 0.000 -4.591 -1.695 LIQ -1.3825 0.357 -3.867 0.000 -2.083 -0.682 IND3A 0.5466 0.141 3.867 0.000 0.270 0.824 const -7.2498 [...] [Read more...]

Dark matter top 10, but an hour too late

December 16, 2012 | Corey Chivers

Well, that’s embarrassing. A little tweak to my dark matter model resulted in a leaderboard score in the top 10. The only problem is that the contest closed about an hour ago. I ran this final prediction earlier today but then simply forgot to go back to it and submit!! ... [Read more...]

Quick Start R

December 16, 2012 | Mike Spaner

I outlined some personal suggestions for those interested in learning R. Refer to the new page  titled “Quick Start R“. …Continue reading » [Read more...]

Taxonomy with R: Exploring the Taxize-Package

December 16, 2012 | Kay Cichini

First off, I'd really like to give a shout-out to the brave people who have created and maintain this great package - the fame is yours!So, while exploring the capabilities of the package some issues with the ITIS-Server arose and with large datasets things weren't working out quite well ... [Read more...]
1 5 6 7 8 9 16

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)