Displaying 20 results from an estimated 6000 matches similar to: "Problem in weighting standard deviations"
2011 Mar 19
2
Output a table formatted with standard deviations below means
Is it in bad form to double post to StackOverflow and R-help? Apologies if
so. Here's my task:
I've got a matrix of means like so
means<-matrix(1:10,nrow=2)
colnames(means)<-c("a","b","c","d","e")
and a matrix of standard deviations like so
sds<-matrix(seq(0.1,1,by=0.1),nrow=2)
2011 Jul 20
1
Latex Table for means and standard deviations in brackets
Hello all,
I am new to xtable. I have several datasets in the form of matrices.
Consider the following two simple datasets which are 2 x 3 matrices. The
rows in both matrices have the same meaning. For example the first row of
both matrices are variable 1 and the second row of both matrices are
variable 2.
dataset1 = matrix( c(1,2,3,4, 5, 6 ), 2 , 3)
dataset2 = matrix( c(4,3,5,10, 1, 0), 2, 3)
2005 Mar 09
4
How to get standard deviation of rows in a matrix
Hi all,
I am trying to find sd of my rows in a matrix and i get column sd inspite of extracting rows.
I tried to do the sqrt(var(x)) but that did'nt work as well,
Here is my data
genes
15 24 63 40
25 42 46 35
23 53 37 45
30 37 50 55
40 51 30 48
x<-sd(genes[1:5,])
y<-sqrt(var(genes[1:5,]))
I get 4 sds for the 4 columns instead of 5 sds for my 5 rows.
Thanks you in advance.
2012 Oct 16
1
Package survey: Compute standard deviations from complex survey designs
Hello,
svyvar from the survey package computes variances (with standard errors)
from survey design objects. Is there any way to compute standard
deviations and their standard errors in a similar manner?
Thanks a lot,
Sebastian
2006 Jan 12
1
t-test for standard deviations
Dear R-users,
I am new to the list and I would like to submit (probably!!!!) a stupid question:
I found in a paper a reference to a t-test for the evaluationg the difference between the standard deviations of 2 samples.
This test is performed in the paper but the methodology is not explained and any reference is reported.
Does anyone know where I can find references to this test and if it is
2011 Aug 17
3
questions about "metafor" package
Hello,
I would like to do a meta-analysis with the package « metafor ». Ideally I would like to use a mixed model because I’m interested to see the effect of some moderators. But the data set I managed to collect from literature presents two limits.
- Firstly, for each observation, I have means for a treatment and for a control, but I don’t always have corresponding standard
2007 Jul 23
1
replacing double for loops with apply's
Hi,
I am doing double for loops to calculate SDs with some weights and wondering
if I can get rid of the outer for loop as well. I made a simple examples
which is essentially what I am doing.
Thanks for your help!
-Young
#------------------------------------------------------
# wtd.var is Hmisc package
# you can replace the 3 lines inside for loop as
# sdx[i,] =
2009 Jun 22
3
Calculating "row standard deviations"
Hi R-helpers,
I have been struggling with calculating row and column statistics,
e.g. standard deviation.
I know that
> datac$Mean<-rowMeans(datac,na.rm=TRUE)
will give me row means.
I have tried to replicate those row means with the apply function:
> datac$Mean2<-apply(datac,2,mean)
so that I can replace the function argument with "sd" (instead of
mean) to get standard
2009 Jun 25
3
ANOVA with means and SDs as input
Dear R-community,
I'm struggling with a paper that reports only fragmented results of a
2by2by3 experimental design. However, Means and SDs for all cells are given.
Does anyone know a package/function that helps computing an ANOVA with only
Means and SDs as input (resulting in some sort of effect size and
significance test)?
The reason why I'm interested is simple: I'm conducting a
2011 Feb 01
2
Problems with sample means and standard deviations
An embedded and charset-unspecified text was scrubbed...
Name: ei saatavilla
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110201/fe2362c4/attachment.pl>
2008 May 19
2
Converting variance covariance matrix to correlation matrix
Suppose I have a Variance-covariance matrix A. Is there any fast way to
calculate correlation matrix from 'A' and vice-versa without emplying any
'for' loop?
[[alternative HTML version deleted]]
2011 Jul 21
2
Latex Table Help on R
Hello everyone,
Peter (see my earlier post) recommended the following script for finding the
means and standard deviations and putting them in table form.
However, I would like the standard deviations under the means in brackets.
Can anyone check this code to see how this can be adjusted?
library(xtable)
dataset1 = matrix( c(1,2,3,4, 5, 6 ), 2 , 3)
dataset2 = matrix( c(4,3,5,10, 1, 0), 2, 3)
2007 Apr 09
3
sem vs. LISREL: sem fails
I am new to R.
I just tried to recreate in R (using sem package and the identical input data) a solution for a simple measurment model I have found before in LISREL. LISREL had no problems and converged in just 3 iterations.
In sem, I got no solution, just the warning message:
"Could not compute QR decomposition of Hessian.
Optimization probably did not converge.
in: sem.default(ram =
2006 Nov 07
1
Better way to create tables of mean & standard deviations
Hi
I'm trying to create tables of means, standard deviations and numbers
of observations (i) for
each laboratory (ii) for each batch number (iii) for each batch at
each laboratory for the attached data.
I created these functions:
summary.aggregate <- function(y, label, ...)
{
temp.mean <- aggregate(y, FUN=mean, ...)
temp.sd <- aggregate(y, FUN=sd, ...)
temp.length <-
2017 Dec 03
1
Discourage the weights= option of lm with summarized data
Peter,
This is a highly structured text. Just for the discussion, I separate
the building blocks, where (D) and (E) and (F) are new:
BEGIN OF TEXT --------------------
(A)
Non-?NULL? ?weights? can be used to indicate that different
observations have different variances (with the values in ?weights?
being inversely proportional to the variances);
(B)
or equivalently, when the elements of
2005 Aug 17
4
How to assess significance of random effect in lme4
Dear All,
With kind help from several friends on the list, I am getting close.
Now here are something interesting I just realized: for random
effects, lmer reports standard deviation instead of standard error! Is
there a hidden option that tells lmer to report standard error of
random effects, like most other multilevel or mixed modeling software,
so that we can say something like "randome
2009 Jun 18
4
Random number datasets help
Hello:
My problem is that I have a data frame of means, and a data frame of standard deviations which match up to each mean. I have been trying to create 500 random numbers in a given dataset for each mean/sd combination, but I am only able to generate the last value in each data set to create one dataset (there should be 28 in all). Examining my code, what can I change to generate 28 datasets
2008 Jan 30
4
Loop with variable index
I have a list of 20 values. The first time through a loop I want to find the
mean and stnd.dev. of the first two values; the second time through the loop
I want to find the mean and stnd. dev. of the first 3 values, etc. until
the last time through the loop I want to find the mean and stnd. dev. of all
20 values, so I end up with 19 means and stnd. deviations.
How would I construct such a loop?
2011 Jan 10
2
Calculating Portfolio Standard deviation
Dear R helpers
I have following data
stocks <- c("ABC", "DEF", "GHI", "JKL")
prices_df <- data.frame(ABC = c(17,24,15,22,16,22,17,22,15,19),
DEF = c(22,28,20,20,28,26,29,18,24,21),
GHI = c(32,27,32,36,37,37,34,23,25,32),
2010 Apr 29
1
How to estimate the residual SD for each sample separately in mixed-effects model?
Dear R-helpers,
I am developing a Mixed-Effects model for a study of immunoassays using
'lme4' library. The study design is as follows: 10 samples were run
using 7 different immunoassays, 3 times each, in duplicates. Data
attached. I have developed the following model:
c.lme <- lmer(Result~SPL + (SPL|Assay/Run) -1, data=data)
This model has excellent predictions - the Rsquared of