In previous versions of the lme4 package for R, the random-effects
model matrix, Z, or its transpose, Zt, have been stored as
compressed sparse column-oriented
matrices, which is a general sparse matrix representation.
As implemented in the
Matrix package for R,
an m by n dgCMatrix matrix with nnz non-zeros has three vector slots: p,
which is the length n + 1 vector of column pointers, i, which is
the length nnz vector of row indices, and x, which is the length
In revising our 1988 Wiley book Nonlinear Regression Analysis and Its Applications I have taken advantage of advances in computing to evaluate projections of residual sum-of-squares contours for 3-parameter models. By evaluating the residual sum-of-squares on a 3-dimensional grid I can create the projections onto the 2-dimensional faces and plot contours. I also hope to use 3-D graphics to plot the 2-dimensional boundary. Any pointers on how to go about this would be appreciated. I presume I would need to generate a mesh for the surface from the grid values and then use something like OpenGL for the
I would like to be able to cross-tabulate vectors or, more generally, factors in Julia. It may be that the capability already exists but, if so, I haven't been able to discover the function name.
Assuming that the capability needs to be created, I started by defining the types
abstract table
type crosstab <: table
    levels::Tuple
    table::Array{Uint32}
endThese notes are based on Patrick O'Leary's video that he kindly created when I was wingeing about problems with git. It is best to watch the video first then go back through these notes to recall the steps.
Create a clone of the JuliaLang repository
git clone git://github.com/JuliaLang/julia.gitor
git clone git://github.com/JuliaLang/julia.git myjulia| for (potrs, elty) in (("dpotrs_", :Float64), ("spotrs_", :Float32), | |
| ("zpotrs_", :Complex128), ("cpotrs_", :Complex64)) | |
| @eval begin | |
| function _jl_lapack_potrs(uplo, n, nrhs, A::StridedMatrix{$elty}, lda, B, ldb) | |
| info = Array(Int32, 1) | |
| ccall(dlsym(_jl_liblapack, $potrs), Void, | |
| (Ptr{Uint8}, Ptr{Int32}, Ptr{Int32}, Ptr{Float64}, Ptr{Int32}, | |
| Ptr{Float64}, Ptr{Int32}, Ptr{Int32}), | |
| uplo, &n, &nrhs, A, &lda, B, &ldb, info) | |
| return info[1] | 
The Gibbs sampler discussed on Darren Wilkinson's blog and also on Dirk Eddelbuettel's blog has been implemented in several languages, the first of which was R.
The task is to create a Gibbs sampler for the unscaled density
 f(x,y) = x x^2 \exp(-xy^2 - y^2 + 2y - 4x)
using the conditional distributions
 x|y \sim Gamma(3, y^2 +4)
y|x \sim Normal(\frac{1}{1+x}, \frac{1}{2(1+x)})