Displaying 20 results from an estimated 238 matches for "sds".
Did you mean:
lds
2012 Mar 21
1
enableJIT() and internal R completions (was: [ESS-bugs] ess-mode 12.03; ess hangs emacs)
..."from=" "to="
[13] "cut=" "na.rm="
Disabling JIT warnings removes the notes, but the call remains to be
extremely slow, as the compiler still processes all the exceptions.
Thanks,
Vitalie.
>>>> Sam Steingold <sds at gnu.org>
>>>> on Tue, 20 Mar 2012 13:09:07 -0400 wrote:
> ess hangs emacs completely.
> I just created a brand new Rprofile
> options(error = utils::recover)
> library(compiler)
> compiler::enableJIT(3)
> and now and I start R and start typing I...
2016 Apr 25
0
use switch or function in connecting different cases.
This is my current work.Now i am trying to use a function to do the normal distribution simulation.
rm(list=ls())
t <- u<- mann<- rep(0, 45)
Nsimulation<-function(S1,S2,Sds,nSims)
{
set.seed(1)
for (sim in 1:nSims)
{
matrix_t <-matrix(0,nrow=nSims,ncol=3)
matrix_u<-matrix(0,nrow=nSims,ncol=3)
matrix_mann <-matrix(0,nrow=nSims,ncol=3)
#generate random samples from 2 no...
2005 Mar 09
2
Question about biasing in sd()???
Hi,
Can anyone help me with the following. I have been using R for Monte
Carlo simulations and got some results I couldn't explain. Therefor I
performed following short test:
--------------
mean.sds <- NULL
sample.sizes <- 3:30
for(N in sample.sizes){
dum <- NULL
for(I in 1:5000){
x <- rnorm(N,0,1)
dum <- c(dum,sd(x))
}
mean.sds<- c(mean.sds,mean(dum))
}
plot(sample.sizes,mean.sds)
--------------
My question is why don't I get 1 as a result from my sd() for s...
2016 Apr 25
2
R: use switch or function in connecting different cases.
...0,nrow=nSims,ncol=3)
matrix_mann <-matrix(0,nrow=nSims,ncol=3)
sample_sizes<-
matrix(c(10,10,10,25,25,25,25,50,25,100,50,25,50,100,100,25,100,100),
nrow=2)
p1<-p2<-p3<-vector()
nSims<-10
alpha<-0.05
set.seed(1)
simulation<-function(m,n,sds)
{
for (ss in 1:dim(sample_sizes[2])){
m<-[ss,1]
n<[ss,2]
for (sim in 1:nSims)
{
m<-c(10,25,50,100)
n<-c(10,25,50,100)
sds<-c(1,1.5,2,2.5,3)
simulation(m=m,n=n,,sds=sds)
p1 <- t.test(x1,y1,var.equal=TRUE)$p.value
p2<-t.test(x1,y1,var.equal=FALSE)$p...
2011 Mar 19
2
Output a table formatted with standard deviations below means
...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)
colnames(sds)<-c("a","b","c","d","e")
and I want to output a Latex (or HTML) table where the standard deviations
appear in parens just below the corresponding means.
Something like this:
a & b...
2013 Sep 10
1
[PATCH] show vector length in summary()
(summary.default): show the vector length in addition to quantiles
diff -u -i -p -F '^(def' -b -w -B /home/sds/src/R-3.0.1/src/library/base/R/summary.R.old /home/sds/src/R-3.0.1/src/library/base/R/summary.R
--- /home/sds/src/R-3.0.1/src/library/base/R/summary.R.old 2013-03-05 18:02:33.000000000 -0500
+++ /home/sds/src/R-3.0.1/src/library/base/R/summary.R 2013-09-10 10:19:02.682946339 -0400
@@ -39,6 +39,7 @@...
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 meta-analysis. If
I included only what the a...
2009 Jan 23
1
plotting curve in xYplot -- using panel.curve
...see
example below). I can get Figure 1 below to plot the data with error.
However, I keep getting a the error message
"Error using packet 1 object "y" not found"
Can anyone see what I am doing wrong?
Thanks!
John
-------------------------------
a=0.002; b=31.7; c=0.51
sds=rep(c(0,3,5,10,20,50,200), each=3)
y1=c(0,0,0.16, 0, 0.33,0.5, 0.16, 0.83, 1.16, 0.67, 0.5, 1.16, 0.83,
2.33, 3.6, 5.5, 4.33, 1.16, 22, 13, 12)
lo=y1-0.1*y1
hi=y1+0.1*y1
# Figure 1
xYplot(Cbind(y1, lo, hi)~jitter(sds, amount=1),
method="bars",ylim=c(0,max(hi)+1),
ylab="...
2005 Mar 09
4
How to get standard deviation of rows in a matrix
...g 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.
Choudary Jagarlamudi
Instructor
Southwestern Oklahoma State University
STF 254
100 campus Drive
Weatherford OK 73096
Tel 580-774-7136
________________________________
2005 Apr 05
1
Fitdistr and likelihood
Hi all,
I'm using the function "fitdistr" (library MASS) to fit a distribution to
given data.
What I have to do further, is getting the log-Likelihood-Value from this
estimation.
Is there any simple possibility to realize it?
Regards, Carsten
2016 Apr 06
0
R-dvel [robustness Simulation study of 2 sample test on several combination of factors ]
...for each
replication and the number of replications. It takes 5-10 minutes to
run.
## Put the samples sizes into matrix then use a loop for sample sizes
sample_sizes<-
matrix(c(10,10,10,25,25,25,25,50,25,100,50,25,50,100,100,25,100,100),
nrow=2)
#create vector to combine all std deviations
sds<-c(4,6,8,10,12,14)
# this number is needed below
nsds<-length(sds)
set.seed(8)
#number of simulations
nSims<-10000
#set significance level,alpha for the whole simulatio
alpha<-0.05
#set empty vector of length no.of _calculations_ to store p-values
# Note: you have 54 calculations, not...
2008 Feb 02
1
Help with loops and how R stores data
...roblem I am having is that R only replaces the last value from the
loops, and I am not experienced enough with R to know how it stores data
when looping and how to overcome this problem. By having it print the avg, I
was expecting to see 24 numbers, but it only gives me one.
Here is my code.
cts.sds<-array(1:24,c(3,8))
for(i in 3){
for(j in 8){
avg<-sum(exprdata[3*i-2:3*i,j]/3)
cts.sds[i,j]<-avg
print(avg)
}
}
print(cts.sds)
Any help with this pesky matter will be greatly appreciated.
--
View this message in context: http://www.nabble.com/Help-with-loops-and-how-R-...
2011 Jul 21
2
Latex Table Help on R
...eans 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)
dataset <- rbind(dataset1,dataset2) #combine dataset
means <- apply(dataset,1,mean) #calculate row means
sds <- apply(dataset,1,sd) #calculate row standard deviation
msd <- paste(round(means,2)," (",round(sds,2),")",sep="") #mean and
standard deviation
rn <- c("Var1","Var2") #rownames
cn <- c("Dataset1","Dataset2") #...
2018 Apr 27
5
predict.glm returns different results for the same model
Hi all,
Very surprising (to me!) and mystifying result from predict.glm(): the
predictions vary depending on whether or not I use ns() or
splines::ns(). Reprex follows:
library(splines)
set.seed(12345)
dat <- data.frame(claim = rbinom(1000, 1, 0.5))
mns <- c(3.4, 3.6)
sds <- c(0.24, 0.35)
dat$wind <- exp(rnorm(nrow(dat), mean = mns[dat$claim + 1], sd =
sds[dat$claim + 1]))
dat <- dat[order(dat$wind), ]
m1 <- glm(claim ~ ns(wind, df = 5), data = dat, family = binomial)
m2 <- glm(claim ~ splines::ns(wind, df = 5), data = dat, family = binomial)
# The...
2013 Jan 04
4
non-consing count
...ount.0 <- length(which(x == 0))
--8<---------------cut here---------------end--------------->8---
however, this approach allocates and discards 2 vectors: a logical
vector of length=length(x) and an integer vector in which.
is there a cheaper alternative?
Thanks!
--
Sam Steingold (http://sds.podval.org/) on Ubuntu 12.04 (precise) X 11.0.11103000
http://www.childpsy.net/ http://iris.org.il http://honestreporting.com
http://jihadwatch.org http://pmw.org.il http://www.PetitionOnline.com/tap12009/
War doesn't determine who's right, just who's left.
2010 Sep 14
3
rnorm using vector of means and SDs
...). That is, I have a list/vector of say 100 means and another of the corresponding 100 SD's, and I want a matrix of 100 rows (one for each mean and SD pair) each having 1000 random samples.
Something like:
sample_matrix = rnorm(n=1000, mean=vector_of_100_means, sd=vector_of_100_corresponding_SDs)
Is this possible? Thanks for any help in advance.
2016 Apr 06
0
R-dvel [robustness Simulation study of 2 sample test on several combination of factors ]
...is because that i have to consider the outer loop and inner loop also... so the iterative for i need to minus one because it have ran one times simulation already ,then times the number of sizes of inner loop, then plus the iterative of j....
then for the simulation, i think there will be ((ss-1)*nsds +sim) for the index in the body of for loop...
Is it correct?
Sent from my phone
On Jim Lemon <drjimlemon at gmail.com>, Apr 6, 2016 6:52 PM wrote:
You are running through two loops and putting the output into a
vector. Without this calculation you will overwrite the same elements
of the ou...
2012 Dec 04
3
list to matrix?
...19), c(5e+05, 16))
as.matrix(a)
[,1]
[1,] Numeric,2
[2,] Numeric,2
[3,] Numeric,2
[4,] Numeric,2
[5,] Numeric,2
[6,] Numeric,2
[7,] Numeric,2
[8,] Numeric,2
[9,] Numeric,2
--8<---------------cut here---------------end--------------->8---
thanks!
--
Sam Steingold (http://sds.podval.org/) on Ubuntu 12.04 (precise) X 11.0.11103000
http://www.childpsy.net/ http://palestinefacts.org http://dhimmi.com
http://jihadwatch.org http://www.PetitionOnline.com/tap12009/ http://memri.org
Rhinoceros has poor vision, but, due to his size, it's not his problem.
2009 Aug 14
2
mixed normal distriburtion
How I can generate a random sample from a mixed norml distribution?
(i.e. a mixed normal distribution in the form f(x)=.6*N(1,5)+.4*N(2,3)
in which N(A,B) is a normal distribution with mean A and variance B.)
--
Free e-mail accounts at http://zworg.com
2012 Feb 10
2
the value of the last expression
Is there an analogue of common lisp "*" variable which contains the
value of the last expression?
E.g., in lisp:
> (+ 1 2)
3
> *
3
I wish I could recover the value of the last expression without
re-evaluating it.
thanks
--
Sam Steingold (http://sds.podval.org/) on Ubuntu 11.10 (oneiric) X 11.0.11004000
http://www.childpsy.net/ http://camera.org http://ffii.org
http://truepeace.org http://memri.org http://americancensorship.org
The early bird may get the worm, but the second mouse gets the cheese.