1290 search results for "LateX"

Numerical computation of quantiles

October 23, 2013
By
$Numerical computation of quantiles$

Recently I had to define a R function that would compute the -th quantile of a continuous random variable based on an user-defined density function. Since the main objective is to have a general function that computes the quantiles for any user-defined density function it needs be done numerically. Problem statement Suppose we are interested

GLM, non-linearity and heteroscedasticity

October 22, 2013
By
$Y_i=\beta_0+\beta_1 X_i +\varepsilon_i$

Last week in non-life insurance course, we’ve seen the theory of the Generalized Linear Models, emphasizing the two important components the link function (which is actually the key component in predictive modeling) the distribution, or the variance function Just to illustrate, consider my favorite dataset ­lin.mod = lm(dist~speed,data=cars) A linear model means here where the residuals are assumed to be...

How Do You Write Your Model Definitions?

October 20, 2013
By

I’m often irritated by that when a statistical method is explained, such as linear regression, it is often characterized by how it can be calculated rather than by what model is assumed and fitted. A typical example of this is that linear regression is often described as a method that uses ordinary least squares to calculate the best...

Trading Strategies Performance Report with R and Knitr

October 18, 2013
By

I’ve been looking for template reports using R and Knitr for a while but I didn’t find anything that suits my needs so far. I therefore decided to create them myself. What I like to see about trading strategies are basic performance charts (daily, monthly and yearly), some basic trading statistics and above all most

Version 1.1 of the likert Package Released to CRAN

October 18, 2013
By

After some delay, we are happy to finally get version 1.1 of the likert package on CRAN. Although labeled 1.1, this is actually the first version of the package released to CRAN. After receiving some wonderful feedback from useR! this year, we held back releasing until we implemented many of the feature suggestions. The NEWS file...

drawing surface plots on the IR³ simplex

October 17, 2013
By

As a result of a corridor conversation in Warwick, I started looking at distributions on the IR&sup3; simplex, and wanted to plot the density in a nice way. As I could not find a proper package on CRAN, the closer being the BMAmevt (for Bayesian Model Averaging for Multivariate Extremes) R package developed by a

Latent Gaussian Models and INLA

October 16, 2013
By
$Latent Gaussian Models and INLA$

If you read my post about Fast Bayesian Inference with INLA you might wonder which models are included within the class of latent Gaussian models (LGM), and can therefore be fitted with INLA. Next I will give a general definition about LGM and later I will describe three completely different examples that belong to this

Generating your own normal distribution table

October 15, 2013
By

It might sounds incredibly old fashion, but for my the exam for the ACT2121 probability course (to prepare for the exam P of the Society of Actuaries), I will provide a standard normal distribution table. The problem is that it is never the one we’re looking for (sometimes it is the survival function, sometimes it is the cumulative distribution function,...

Use Sweave with TeXmaker and make SyncTeX work properly with it

October 13, 2013
By

Although there are many materials online relating to Sweave and its workflow, I could not find any source on how to make SyncTeX work properly with my favorite TeXmaker editor. I hope that you know the Sweave (http://www.stat.uni-muenchen.de/~leisch/Sweave/) is a tool that allows to embed the R code for complete data analyses in LaTeX documents. If you use...

Post 8: Sampling the variance of person ability with a Gibbs step

October 10, 2013
By

The Bayesian 2PL IRT model we defined in Post 1 set a hyper-prior on the variance of the person ability parameters. This post implements the sampler for this parameter as a Gibbs step. We will check that Gibbs step is … Continue reading →