Displaying 20 results from an estimated 2000 matches similar to: "sample size for t-tests"
2013 Mar 22
1
Integration of vector syntax unknown
Hello,
I'm very new to using R, but I was told it could do what I want. I'm not sure how best to enter the information but here goes...
I'm trying to transfer the following integral into R to solve for ln(gamma_1), on the left, for multiple instances of gamma_i and variable N_i.
gamma_i is, for example, (0, 0.03012048, 0.05000000, 0.19200000, 0.44000000, 0.62566845)
N_i (N_1 or
2010 Nov 27
3
Two time measures
Hello!
I have a csv file of intra-day financial data (5-min closing prices) that
looks like this: (obs - the dates are formated as day/month/year, as is
usual here in Brazil)
Date;Time;Close
01/09/2009;10:00;56567
01/09/2009;10:05;56463
01/09/2009;10:10;56370
##(goes on all day)
01/09/2009;16:45;55771
01/09/2009;16:50;55823
01/09/2009;16:55;55814
##(jumps to the subsequent day)
2009 Oct 16
1
How odds ratio is computed in fisher.test()?
I'm wondering how odds ratio is computed. I thought that it is
(n11/n12)/(n21/n22), but it is not what fisher.test() computes. Could
somebody let me know?
> n11=3
> n12=1
> n21=1
> n22=3
>
> n1_=n11+n12
> n2_=n21+n22
>
> n_1=n11+n21
> n_2=n12+n22
>
> x=rbind(c(n11,n12),c(n21,n22))
>
> threshold=dhyper(n11,n1_,n2_,n_1)
>
2007 Jul 26
1
significance test for difference of two correlations
Dear R users,
how can I test, whether two correlations differ significantly. (I want to prove, that variables are correlated differently, depending on the group a person is in.)
Greetings from Freiburg im Breisgau (Germany),
Timo Stolz
2012 Jun 04
2
paquete SPEI función thornthwaite
Hola eRReros.
Os lo explico con un ejemplo:
# Cargamos los paquetes y el ejemplo
install.packages("SPEI")
library("SPEI")
data(wichita)
# los primeros 12 datos
head(wichita,12)
# mi subset de los primeros 12 datos
meu<-wichita[c(1:12),]
meu
# como veis los valores de TMED son iguales en ambos dataframes.
# ahora viene el problema
# calculamos
2003 Feb 14
1
FW: [Fwd: Re: [S] Exact p-values]
Dear all
Just for fun, I have just downloaded the paper mentioned below and checked
it with R-1.6.1.
Everything is ok with exception of Table 2b, where I get always 1 instead of
0.5:
> pbinom(1e15,2e15,0.5)
[1] 1
Which value should be correct?
Best regards
Christian Stratowa
==============================================
Christian Stratowa, PhD
Boehringer Ingelheim Austria
Dept NCE Lead
2004 Oct 29
1
fitting linear mixed model for incomplete block design
Dear R developers and users:
I have the following data, x is the response vaiable, nsample(individual) nested within trt, and subsample nested within nsample, I want to fit trt as fixed effect, and block, nsample(trt) as random effects using lme, is the following coding correct?
dat$vgrp <- getGroups(dat, form = ~ 1|trt/nsample, level = 2)
ge.lme1 <- lme(fixed=x~trt, data=dat,
2006 Sep 01
1
integration problem with gamma function
Dear R-list members,
I have a problem with translating a mathematica script into R. The whole
script is at the end of the email (with initial values for easy
reproduction) and can be pasted directly into R. The problematic part
(which is included below of course) is
<--- Original Mathematica --->
(* p_svbar *)
UiA = Ni (Dsi - 2Di A + A^2)/2;
UiiA = Nii (Dsii - 2Dii A + A^2)/2;
psvbar =
2010 Sep 08
11
problem with outer
Hello,
i wrote this function guete and now i want to plot it: but i get this error
message. i hope someone can help me.
Error in dim(robj) <- c(dX, dY) :
dims [product 16] do not match the length of object [1]
p_11=seq(0,0.3,0.1)
p_12=seq(0.1,0.4,0.1)
guete = function(p_11,p_12) {
set.seed(1000)
S_vek=matrix(0,nrow=N,ncol=1)
for(i in 1:N) {
X_0=rmultinom(q-1,size=1,prob=p_0)
2017 Jun 13
2
RFC: Dynamic dominators
Btw, here is another interesting paper about post-dominators and control
dependence:
https://pdfs.semanticscholar.org/cbb2/9a0e4895025bd9df24f9263217df12f1ed1e.pdf
I think a great outcome of your internship would be some precise
documentation regarding the guarantees the LLVM dominators give --
possibly also considering classic and weak control dependence and the
difference between
2006 Dec 19
3
Bug in rt() ? (PR#9422)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
<<insert bug report here>>
Reproduced on Debian and Windows ...
On 2.4.x if you execute
set.seed(12345)
t.1 <- rt(n = 1000, df = 20)
set.seed(12345)
t.2 <- rt(n = 1000, df = 20, ncp = 0)
all.equal(t.1, t.2) ## Not close to true
This appears to be due to the fact that in 2.4.x rt is now
rt
function (n, df, ncp = 0)
{
if
2002 Jul 01
1
Substitutions in strings.
Hi all,
Sorry to bother you with the potentially not too bright question, but
since I cannot get it to work, I'll have to ask someone..
I've got this vector:
> token
[1] sal skal skal bak b_r d_ gal kal l_r n_r pak
p_r
[13] sal sl_r sn_r spak sp_r st_r s_ bak d_ gal l_r
pak
[25] p_r sak sl_r sp_r t_ kal n_r s_ st_r sak kal
2008 Jun 14
1
qt with ncp>37.62
help(qt) states that:
"ncp non-centrality parameter delta; currently except for rt(), only for
abs(ncp) <= 37.62"
so I would expect that calling qt with non-centrality parameter exceeding
37.62 should fail, instead e.g. calling
> mapply(function(x) qt(p = 0.9, df = 55, ncp = x),35:45)
gives:
[1] 40.21448 41.35293 42.49164 43.68862 44.82945 45.97048 47.11170 48.25310
[9]
2009 May 28
4
Managing core files using coreadm (Solaris + Puppet)
Hi all,
I have an interesting one - Solaris uses a lot of commands to
configure specific items. A simple
example is coreadm. In this example:
# coreadm -p "/var/core/core_%n_%f_%u_%g_%t_%p"
will set the directory and filename to dump core files (with some
expansion).
The question is - how to get this to run only if the config has
changed. I have come up with 2 options, neither of
2007 Jan 31
2
Bug in 'pchisq' for x=0.0 (PR#9485)
The function 'pchisq' from the 'stats' library gives a wrong result if the
argument equals exactly zero:
# Upper tail of central 1-df chi^2 distribution
> pchisq(1 , 1, ncp=0, lower.tail = F, log.p = FALSE)
[1] 0.3173105
> pchisq(0.5 , 1, ncp=0, lower.tail = F, log.p = FALSE)
[1] 0.4795001
> pchisq(0.01 , 1, ncp=0, lower.tail = F, log.p = FALSE)
[1]
2000 Nov 28
1
non-centrality parameter in pf() (PR#752)
Bug Description:
Problem with the function pf() when the non-centrality
parameter is large. Here is a sample command. You should
see a smooth line from 0 to about 55, and then the values
of pf() go crazy from 55 to 100.
############################
ncp <- seq(0,100,length=200)
plot(ncp,pf(5,7,2,ncp=ncp))
############################
Version:
platform = i686-pc-linux-gnu
arch = i686
os =
2003 Apr 13
2
Peculiarity in non-central qchisq for ncp > 294.92 ...
Hello all,
Here's my query:
Running R 1.6.2 on FreeBSD 5.0, and on WinXP, and I find that the
following hangs the process:
dchisq(alpha=0.01, df=1, ncp=295)
but it does work for ncp < 294.92.
Is this general?
Best wishes to all,
Andrew
Andrew Robinson Ph: 208 885 7115
Department of Forest Resources Fa: 208 885 6226
University of Idaho E : andrewr at uidaho.edu
PO
2008 Jan 07
2
chi-squared with zero df (PR#10551)
Full_Name: Jerry W. Lewis
Version: 2.6.1
OS: Windows XP Professional
Submission from: (NULL) (24.147.191.250)
pchisq(0,0,ncp=lambda) returns 0 instead of exp(-lambda/2)
pchisq(x,0,ncp=lambda) returns NaN instead of exp(-lambda/2)*(1 +
SUM_{r=0}^infty ((lambda/2)^r / r!) pchisq(x, df + 2r))
qchisq(.7,0,ncp=1) returns 1.712252 instead of 0.701297103
qchisq(exp(-1/2),0,ncp=1) returns 1.238938
2006 Mar 06
3
how to make plotmath expression work together with paste
Recent questions about using plotmath have renewed my interest in this question
I want to have expressions take values of variables from the
environment. I am able to use expressions, and I am able to use paste
to put text and values of variables into
plots. But the two things just won't work together.
Here is some example code that shows what I mean.
plot(NA,xlim=c(0,100),ylim=c(0,100))
2005 Mar 17
1
kernlab sigest
hello,
I have the following problem setting parameter 'frac' in the sigest
function of the kernlab package.
## executing the ?sigest example:
library(kernlab)
data(spam)
srange <- sigest(type~.,data = spam)
## works fine...
## setting 'frac' explicitly
## (in this case even to the default of .25)
options(error=recover)
srange <- sigest(type~.,data = spam, frac = .25)
##