Publications by Shige

Loglinear models using R

10.02.2010

For those sociologists who want to estimate complicated loglinear models (e.g. Goodman’s RC model) using R, the package “VGAM” seems to be a good choice. Related To leave a comment for the author, please follow the link and comment on their blog: Shige's Research Blog. R-bloggers.com offers daily e-mail updates about R news ...

569 sym 2 img

Handling hierarchical data structure in R

11.02.2010

R has a comprehensive set of tools for the handling of hierarchical data structure. The most widely used package is probably “nlme” and “lme4”, contributed by Douglas Bates and colleagues. While “nlme” is older and probably more mature than “lme4”, it seems that the latter is increasingly taking over the former becau...

2690 sym 2 img

Cure model using R

13.02.2010

The package “nltm” seems to be able to estimate proportional hazard and proportional odds cure models. I will do some experiments and see how it goes. Related To leave a comment for the author, please follow the link and comment on their blog: Shige's Research Blog. R-bloggers.com offers daily e-mail updates about R news and t...

566 sym 2 img

Generalized linear mixed effect model problem

16.02.2010

I am trying to compare cohort difference in infant mortality using generalized linear mixed model. I first estimated the model in Stata:xi:xtlogit inftmort i.cohort, i(code)which converged nicely:Fitting comparison model:Iteration 0:   log likelihood = -1754.4476Iteration 1:   log likelihood = -1749.3366Iteration 2:   log likelihoo...

3921 sym 2 img

An interesting paper

27.02.2010

Ben Bolker has an interesting paper (outline of a paper) comparing different approaches to estimate GLMM in R environment, which is very helpful to what I am doing right now.The paper pointed out the following options to fit GLMM using R:glmerglmmMLglmm (from the repeated package)glmmADMBMCMCglmmglmmBUGSglmmPQLBUGS (through R2WinBUGS)...

1466 sym 2 img

GLMM revisted

05.03.2010

A short while ago, I reported some discrepancies between the results produced by “lme4” and other R packages as well as Stata. Today I upgraded to the most recent version of “lme4a” and re-ran my model. The error of false convergence disappeared and the new results are very much in line with other packages.I am glad that the...

916 sym 2 img

Measuring the length of time to run a function

17.03.2010

This post describes how to time the run time of a R function. Related To leave a comment for the author, please follow the link and comment on their blog: Shige's Research Blog. R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-s...

465 sym 2 img

GLMM using DPpackage

09.04.2010

I was able to fit a semi-parametric Bayesian GLMM model using DPpackage. It took me many hours to sample from the posterior distribution (DPM prior):MCMC scan 1000 of 5000 (CPU time: 18950.080 s)MCMC scan 2000 of 5000 (CPU time: 22510.100 s)MCMC scan 3000 of 5000 (CPU time: 28293.830 s)MCMC scan 4000 of 5000 (CPU time: 35111.930 s)M...

1912 sym 2 img

Trouble with ESS and Sweave

23.04.2010

Last time I tried to sweave a document from with Emacs+ESS, I was using an earlier version of ESS (the current version is 5.8), and things seemed to be fine. Today when I tried to sweave a simple document and produced PDF output, I got error message of “.pdf”: exited abnormally with code 2“. I posted a message to the ESS mailing...

860 sym Python (841 sym/1 pcs) 2 img

Sweave vs. pgfSweave

28.04.2010

I think pgfSweave should replace the default of Sweave system because it brings significant improvements over the original Sweave. I certain have made it my default Sweave tool on my system.——————————- EDITED ON MAY 1, 2010 ————————————–Since StatET made Sweaving so simple and easy, I don�...

895 sym 2 img