Displaying 20 results from an estimated 300 matches similar to: "using metafor for meta-analysis of before-after studies"
2011 Feb 11
3
How can we make a vector call a function element-wise efficiently?
Hello
I have a time-comsuming program which need to simplify, I have tested the annotated program as follow:
> #define function which will be call
> calsta <- function(c, n=100000)
+ {
+ i <- seq(from=0, length=c)
+ logx <- lchoose(NT-n, CT-i) + lchoose(n, i)
+ logmax <- max(logx)
+ logmax + log(sum(exp(logx - logmax)))
+ }
> CT=6000 #assignment to CT
>
2011 Jan 03
3
matrices call a function element-wise
Hello
I have 4 1000*1000 matrix A,B,C,D. I want to use the corresponding element of the 4 matrices. Using the "for loop" as follow:
E<-o
for (i in 1:1000)
{for (j in 1:1000)
{
E<-fisher.test(matrix(c(A[i][j],B[i][j],C[i][j],D[i][j]),2))#call fisher.test for every element
}
}
It is so time-consuming
Need vectorization
Yours sincerely
ZhaoXing
Department of
2011 Jan 11
1
how to use "apply" function partial to each vector of a matrix
Hello
Suppose I have a matrix mat=(1:16,2)
[,1] [,2] [,3] [,4]
[1,] 1 5 9 13
[2,] 2 6 10 14
[3,] 3 7 11 15
[4,] 4 8 12 16
I just want to use the "apply" function to the matrix partially
there is a vector end=c(2,3,1,3)
#sum the 1st 2 numbers of the 1st column
#sum the 1st 3 numbers of the 2nd column
#sum the 1st number of the 3rd column
2011 Jan 11
1
how to coerce part of each column of a matrix to a vector and merge them
Hello
Suppose I have a matrix mat=(1:16,2)
[,1] [,2] [,3] [,4]
[1,] 1 5 9 13
[2,] 2 6 10 14
[3,] 3 7 11 15
[4,] 4 8 12 16
there is a vector end=c(2,3,1,3)
#coerce the 1st 2 numbers of the 1st column to a vector [1] 1 2
#coerce the 1st 3 numbers of the 2nd column and append it to the previous vector [1] 1 2 5 6 7
#coerce the 1st number of
2011 Feb 07
1
how to return multipy matrix in a function
Hello
I have a 100*100 matrix which is from a intensive computation, e.g. mat. Is there any method/function that return the max of every row and the subscript of maximum value simultaneously
#define the function
> returnfunction<-function(x){
+ value<-apply(x,1,max)
+ index<-apply(x,1,which.max)
+ }
> mat<-matrix(c(3,5,7,2,1,10,4,3,2),3)#initilize the matrix for test
>
2012 Apr 04
1
using metafor for meta-analysis of before-after studies
Greetings,
I wish to conduct a meta-analysis for which the outcome is a continuous
variable measured on the same individuals before and after an intervention.
Hence, the comparison is not made between two groups, but within groups, at
diffrent times.
Each study reports the mean outcome and SD before the intervention and the
mean outcome and SD after the intervention. While p-values for
2011 Feb 12
1
how to improve the precison of this calculation?
Hello
T
I want to order some calculation "result", there will be lots of "result" that need to calculate and order
PS: the "result" is just a intermediate varible and ordering them is the very aim
# problem:
# For fixed NT and CT, and some pair (c,n). order the pair by corresponding result
# c and n are both random variable
CT<-6000 #assignment to CT
2011 Jan 10
0
how to create and manage a matrix with vector of different length
Hello
I have a data consisting of 245 counties, including the population, number of illness and the geographical information of each county. Fixing each county, I want to sort the other county by distance, which can make a 245*245 matrix with each cell is the corresponding index of the county, e.g. the 3rd row of the matrix is a vector of descending order of the 245 indices, maybe
2011 Jan 07
4
how to calculate this natural logarithm
Hello
I want to calculate natural logarithm of sum of combinations as follow: (R code)
{
com_sum=choose(2000000,482)*choose(1000000,118)+choose(2000000,483)*choose(1000000,117)+...+choose(2000000,i)*choose(1000000,600-i)+...+choose(2000000,600)*choose(1000000,0) #calculate the sum
result=log(com_sum) #calculate the log of the sum
}
But
2013 Feb 22
1
Is it possible to obtain an agglomeration schedule with R cluster analyis
Hello,
In SPSS the cluster analysis output includes an agglomerations
schedule, which details the stages when cases are joined.
Is it possible to obtain such output when performing cluster analysis
in R? If so, I'd appreciate advice regarding how to obtain this information.
Any assistance is appreciated,
Regards
Bob
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
2011 Oct 03
1
Meta-analysis of test statistics in "metafor" package?
Hi -
I am conducting a meta-analysis and I have a matrix of f-statistics, Ns and
dfs from a series of studies that tested for an interaction in a 2x2 anova.
I'd like to test whether the 2x2 interaction is significant in the
aggregate.
Similarly, I have a matrix of chi-square statistics that I'd like to
meta-analyze.
How can I input these test statistics into the "metafor"
2013 Mar 02
1
Metafor "SMCR" Pre-Post Effect sizes
Dear all,
I am very grateful that Wolfgang Viechtbauer implemented the standardised mean change for dependent
groups. I was playing around a bit today, and I am not sure if I understand the "SMCR" procedure correctly. The documentation states that sd1i and sd2i are needed, but it seems to me that SMCR is ignoring sd2i (so Variances are not pooled). Instead, it uses sd1i (pre-test sd),
2012 Jan 14
1
metafor: weights computation in Mantel-Haenszel method
Dear R users,
In metafor 1.6-0, the Mantel-Haenszel method is implemented by the rma.mh() function. I have observed that the sum of the weights computed by weights(x) doesn't add to 100% when x is an object of class rma.mh. The consequences of this fact can be clearly seen when a forest diagram is drawn with forest(x), which calls weights(x) (or more precisely, the method weights.rma.mh()
2009 Jun 05
1
New Meta-Analysis Package (metafor)
A new package is now available via CRAN, called metafor.
The metafor package consists of a collection of functions for conducting meta-analyses in R. Fixed- and random-effects models (with and without moderators) can be fitted via the general linear (mixed-effects) model. For 2x2 table data, the Mantel-Haenszel and Peto's method are also implemented. The package also provides various plot
2010 May 26
1
forest() in {metafor} :: edit labels
Hi Kim and Others,
Can anyone please help me on how can I edit default labels ( "Study 1",
"Study 2",...)
using forest() - same question as below. Which option I should try?
It would be a great help. Thanks in advance,
On Sun, Dec 13, 2009 at 7:14 PM, Kim Jung Hwa <kimhwamaillist@gmail.com>wrote:
> Hi All,
>
> I'm using forest() from metafor package to
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.
2011 Feb 20
1
Help Metafor
? stato filtrato un testo allegato il cui set di caratteri non era
indicato...
Nome: non disponibile
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110220/1f45c288/attachment.pl>
2011 Jul 18
1
Extract confidence intervals from rma object (metafor package)
Dear R-experts!
I am working on some meta-analysis using the metafor package. I would like
to extract values of the confidence intervals of the effect sizes of the
single studies from an rma object. Those values are printed out when
plotting a forest plot using the forest function on the rma object, however
I was not able to locate them.
Many thanks for your help!
Jokel
[[alternative HTML
2012 Jan 11
1
meta-analysis normal quantile plot metafor
Hello,
I once used the metawin software to perform a meta-analysis (see
metawinsoft, Rosenberg et al.) and produced normal qqplot to test for
a potential bias in the dataset.
I now want to re-use the same dataset with the package metafor by W.
Viechtbauer (great package btw).
I run the qqnorm.rma.uni function. I use standardized effect sizes as
in metawin.
QQplot generated with metafor differs