[R] [R-pkgs] new package 'mvmeta' to perform multivariate meta-analysis

2011-05-12 Thread Antonio.Gasparrini
Dear R Community, I am pleased to announce the release of a new package called 'mvmeta', now available on CRAN (version 0.2.0). The package mvmeta provides some functions to perform fixed and random-effects multivariate meta-analysis and meta-regression. This modelling framework is exploited

[R] default arguments and '...' in a function

2010-12-01 Thread Antonio.Gasparrini
Dear R-users, I'm trying to work out a way to set default values for arguments in a function which includes the optional argument '...'. In practice, I have a 'plot' method for a function which specifies different types of plots. Every different plot should have different default arguments (fo

[R] glmer (lme4), glmmPQL (MASS) and xtmepoisson (Stata)

2010-01-04 Thread Antonio.Gasparrini
Dear R users, I'm trying to specify a generalized linear mixed model in R, basically a Poisson model to describe monthly series of counts in different regions. My aim is to fit subject-specific curves, modelling a non-linear trend for each region through random effects for linear splines compon

[R] multivariate meta-analysis with the metafor package

2009-11-13 Thread Antonio.Gasparrini
Dear Wolfgang Viechtbauer and R users, I have few questions regarding the development of the package 'metafor. As you suggested , I post to the R-help mailing list. I read you're planning an extension of this method to the multivariate case. I think it would be a useful tool. I'm currently perf

Re: [R] new help pages in R 2.10.0

2009-11-05 Thread Antonio.Gasparrini
Thanks to everyone who replied. I think the html based one works fine (even if I definitely preferred the old chtml). Only another comment: I chose html in my installation with Windows Vista, but still the help pages are opened in text files in the newly installed version. Of course, I can ty

[R] new help pages in R 2.10.0

2009-11-05 Thread Antonio.Gasparrini
Dear R-users, I've just installed the last version of R (2.10.0) in Windows and found a completely new version of the help pages. Basically, they now appear as a simple (even if slightly embellished) text file. I tried to install it with a customized startup and realized that the old CHM files

[R] problem with predict(...,type="terms")

2009-08-03 Thread Antonio.Gasparrini
Hello R users, I'm trying to understand the meaning of the results returned by the command 'predict' with type="terms". I thought it was the matrix with the fitted values for each term (value of predictor * related coef), but the calculation is different. I include an example below: y <- rnor

[R] [R-pkgs] new package 'dlnm' to run distributed lag non-linear models

2009-07-20 Thread Antonio.Gasparrini
Dear R Community, I am pleased to announce the release of a new package called 'dlnm', now available on CRAN (version 0.2.1). The package dlnm provides some facilities to run distributed lag models (DLM's) and their non-linear extension (DLNM's), a modelling framework to describe simultaneou

[R] problem with internal functions in Windows

2009-07-06 Thread Antonio.Gasparrini
Dear R users, I included 2 internal functions in the package 'dlnm', called 'mkbasis' and 'mklagbasis'. Despite they are not meant to be called by the users, I included them in the namespace in order to make them available, keeping the process more transparent and giving the opportunity to cha

[R] problem with package creation under Windows and R 2.9.0

2009-06-01 Thread Antonio.Gasparrini
Dear R users, I found a small problem with the package creation procedure in R 2.9.0 under Windows. Basically, I input in the command prompt; Rcmd BUILD --binary --use-zip namepackage The procedure works, but the titles in the help pages of the created package lose the usual colours and fon

[R] creating a package in R

2009-04-19 Thread Antonio.Gasparrini
Dear R users, I created some functions I want to convert in a package under Windows (Vista or XP). I carefully read both "Writing R extensions" by the R Development Core Team and "Creating R packages: a tutorial" by Friedrich Leisch. I've also installed Rtools as suggested. These tutorials are

[R] gee with auto-regressive correlation structure (AR-M)

2009-02-11 Thread Antonio.Gasparrini
Dear all, I need to fit a gee model with an auto-regressive correlation structure and I faced some problems. I attach a simple example: ### library(gee) library(geepack) # I SIMULATE DATA FROM POISSON DISTRIBUTION, 10 OBS FOR EACH OF 50 GROU

[R] gee with auto-regressive correlation structure (AR-M)

2009-02-09 Thread Antonio.Gasparrini
Dear all, I need to fit a gee model with an auto-regressive correlation structure and I faced some problems. I attach a simple example: ### library(gee) library(geepack) # I SIMULATE DATA FROM POISSON DISTRIBUTION, 10 OBS FOR EACH OF 50 GROU

[R] logLik for poisson models

2009-02-01 Thread Antonio.Gasparrini
Dear all, I have a very basic question: how does the logLik function work for poisson models? Example: I simulate 20 observations from a Poisson distribution with mean 800. y <- rpois(20,800) model <- glm(y ~ 1, family=poisson()) logLik(model) I would like to know what's the exact formula th

[R] AIC for quasipoisson link

2008-10-31 Thread Antonio.Gasparrini
Dear fellows, I'm trying to extract the AIC statistic from a GLM model with quasipoisson link. The formula I'm referring to is AIC = -2(maximum loglik) + 2df * phi with phi the overdispersion parameter, as reported in: Peng et al., Model choice in time series studies os air pollution and

[R] bug in lme4?

2008-08-19 Thread Antonio.Gasparrini
Dear all, I found a problem with 'lme4'. Basically, once you load the package 'aod' (Analysis of Overdispersed Data), the functions 'lmer' and 'glmer' don't work anymore: library(lme4) (fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy)) (gm1 <- glmer(cbind(incidence, size - incidence)

[R] R vs Stata on generalized linear mixed models: glmer and xtmelogit

2008-08-18 Thread Antonio.Gasparrini
Hello, I have compared the potentials of R and Stata about GLMM, analysing the dataset 'ohio' in the package 'faraway' (the same dataset is analysed with GEE in the book 'Extending the linear model with R' by Julian Faraway). Basically, I've tried the 2 commands 'glmmPQL' and 'glmer' of R and the

[R] postscript

2008-05-28 Thread Antonio.Gasparrini
Hello, I'm trying to save a graph as a .ps file to include it in a LaTex presentation, but R replies: Error: Invalid font type In addition: Warning messages: 1: font family not found in PostScript font database 2: font family not found in PostScript font database If I load the package grDevice

[R] periodic function

2008-03-22 Thread Antonio.Gasparrini
Hello, I'm trying to built a model for a time-series analysis with an periodic term for seasonality. I've tried both harmonic (package spatstat) and periodicSpline (package splines). The former don't allow a periodic constraint (or it does?), while I've not been able to use the latter within a da