similar to: Writing methods for existing generic function

Displaying 20 results from an estimated 1000 matches similar to: "Writing methods for existing generic function"

2010 Jan 05
1
Is the Intercept Term always in First Position?
Dear All, I have a question about formulas and model.matrix(). If one specifies a model via a formula, the corresponding design matrix can be obtained with the model.matrix() function. For example: x1 <- c(1,4,2,3,5) x2 <- c(1,1,2,2,2) myformula <- ~ x1 + factor(x2) model.matrix(myformula) My question is: If an intercept term is in the model (like in the example above), is it always
2010 Jul 02
1
metafor and meta-analysis at arm-level
Hi, I have been looking for an R package which allowed to do meta-analysis (both pairwise and network/mixed-treatment) at arm-level rather than at trial-level, the latter being the common way in which meta-analysis is done. By arm-level meta-analysis I mean one that accounts for data provided at the level of the individual arms of each trial and that does not simply derive the difference between
2009 Nov 13
1
multivariate meta-analysis with the metafor package
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 performing some analyses with R on multiple outcomes, using the Stata command mvmeta to get
2010 Aug 03
1
Metafor
This is a question of clarification. IN 2009 Higgins, Thompson and Spiegelhalter (J R Statist Soc A 172:137-159) gave WinBUGs code to get credible intervals from random effects meta analysis for the prediction interval of a new study. It appears that the predict.rma function creates approximate credible intervals (pending a function revision by the author) for that purpose. Is my assumption
2009 Dec 05
1
Forest Plot
Hi All, I want to produce a similar "Forest Plot" as it is on the following link, but my data would be having only two columns (one for "Estimate" and other for "Std. Dev"). Can anyone suggest some function() {Package} which can take such file as an input and give following forest plot:
2010 Jun 09
1
back transforming arcsine transformations in metafor
Hi everyone, I'm using the metafor package to meta-analyze a set of proportions. This is working really well for the raw proportions, but is there a way to back-transform the arcsine transformed proportions in the rma or forest functions with the atransf option? The estimates and CIs for the transformed proportions need to be back-transformed to be the sin of the estimate squared.
2010 Feb 21
1
tests for measures of influence in regression
influence.measures gives several measures of influence for each observation (Cook's Distance, etc) and actually flags observations that it determines are influential by any of the measures. Looks good! But how does it discriminate between the influential and non- influential observations by each of the measures? Like does it do a Bonferroni-corrected t on the residuals identified by
2010 Mar 02
1
add a header to a forest plot (metafor)
Dear R-community, I'm currently trying to assemble a forest plot using the "forest" function from package "metaphor". Works well. Even the regular "main"-argument works for adding a title to the graph. However, I would like to add one top row which explains the nature of the columns. Very much like the usual header in spreadsheet programs. For example:
2009 Oct 28
3
structural equation modeling
Dear R-help, I am interested in using structural equation modeling. Just getting started with it, but I'm looking for suggestions for packages. As an aside, what's the best way for looking for packages at CRAN? -- Robert Terwilliger Biomedical Physicist Laboratory of Neurocognitive Development Western Psychiatric Institute and Clinic University of Pittsburgh Medical Center Loeffler
2010 Oct 04
1
Fixed variance structure for lme
I have a data set with 50 different x values and 5 values for the sampling variance; each of the 5 sampling variances corresponds to 10 particular x values. I am trying to fit a mixed effect linear model and I'm not sure about the syntax for specifying the fixed variance structure. In Pinheiro's book my situation appears to be similar to the example used for varIdent, where there is a
2009 Nov 08
2
influence.measures(stats): hatvalues(model, ...)
Hello: I am trying to understand the method 'hatvalues(...)', which returns something similar to the diagonals of the plain vanilla hat matrix [X(X'X)^(-1)X'], but not quite.  A Fortran programmer I am not, but tracing through the code it looks like perhaps some sort of correction based on the notion of 'leave-one-out' variance is being applied. Whatever the
2012 Sep 26
3
Broken Links on http://www.r-project.org
I was not sure who I should contact about this, so I am posting this here. There are a few broken links on the R website. 1) http://www.r-project.org/search.html -> link to the Nabble R Forum. I belive the correct/new URL should be: http://r.789695.n4.nabble.com/ 2) http://www.r-project.org/other-docs.html -> link to "Auswertung ?kologischer Daten". Not sure if there is a new
2010 Jan 04
1
metafor: using mixed models
Dear all, I'm currently applying a mixed model approach to meta analysis using the package metafor. I use the "model.matrix()" function to create dummy variables. The option btt gives me the combined test for the dummies. Problem is, I don't know which indices I have to use, and can't really figure it out from the help file and the examples. I use following code : X <-
2009 Dec 04
1
z to r transformation within print.rma.uni and forest from the package metafor
Dear R community, I'm using the ,metafor'-package by Wolfgang Viechtbauer (Version: 0.5-5) to calculate random-effects meta-analyses using Correlations and Sample Sizes as the raw data. (By the way: Really a nice piece of work, Wolfgang! Thanks heaps.) I specified the "rma.uni' function so that it looks like this: MAergebnis<-rma.uni(ri=PosOutc, ni=N,
2010 Apr 21
2
R crashing oddly
Hi, I am working with the package nlme, and I tried creating a new correlation class (which, according to the help pages, is possible if you write a few new method functions). Anyways, I think I am 99% of the way there, but I have a recurring problem with R crashing on seemingly innocuous statements (I have set debug() on nearly every function, so I can see where it is failing). For instance,
2013 Sep 15
1
FOSS licence with BuildVignettes: false
Dear All, I have been checking the metafor package against R-devel. R CMD check --as-cran metafor yields one note: FOSS licence with BuildVignettes: false Yes, I have 'BuildVignettes: FALSE' in my DESCRIPTION file. I see at http://developer.r-project.org/blosxom.cgi/R-devel/NEWS: Tue, 25 Jun 2013 CHANGES IN R-devel UTILITIES 'R CMD check --as-cran' warns about a false
2009 Nov 08
3
MCMC gradually slows down
Hello, I have written a simple Metropolis-Hastings MCMC algorithm for a binomial parameter: MHastings = function(n,p0,d){ theta = c() theta[1] = p0 t =1 while(t<=n){ phi = log(theta[t]/(1-theta[t])) phisim = phi + rnorm(1,0,d) thetasim = exp(phisim)/(1+exp(phisim)) r = (thetasim)^4*(1-thetasim)^8/(theta[t]^4*(1-theta[t])^8) if(runif(1,0,1)<r){ theta[t+1] = thetasim }
2017 Jun 22
1
Compiling R-devel - missing some expected features (zlib, bzlib, lzma, PCRE)
Hi All, I am compiling R-devel on Linux (Ubuntu 16.04.2) and that works just fine, but I am missing some of the expected features, as shown here: https://cran.r-project.org/doc/manuals/r-devel/R-admin.html#Linux In particular, after configure (using all defaults), I see: R is now configured for x86_64-pc-linux-gnu [...] Interfaces supported: X11 External libraries:
2008 Feb 29
1
Optional data argument for a function
Dear All, I am working on a function that has an optional data argument, just like lm(). If the user sets the data argument equal to some dataframe, then the function should look inside the dataframe for the variables given to other arguments, otherwise the variables should be accessible from what I believe is called the parent frame from which the function was called. I looked at the source code
2010 Apr 14
1
creating a new corClass for lme()
Hi, I have been using the function lme() of the package nlme to model grouped data that is auto-correlated in time and in space (the data was collected on different days via a moving monitor). I am aware that I can use the correlation classes corCAR1 and corExp (among other options) to model the temporal and spatial components of the auto-correlation. However, as far as I can tell, I can only