Displaying 20 results from an estimated 110 matches similar to: "Two time measures"
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
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
2004 Aug 31
2
sample size for t-tests
Dear all,
Could any one please tell me the exact formula R uses to calculate the sample size for one-sample and two-sample t-tests? Thanks,
Caimiao
[[alternative HTML version deleted]]
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
2007 Apr 23
3
getElementsBySelector problem in IE
I''m having this problem with IE and getElementsBySelector, but am a
relative js novice, so quite possible -- likely even -- that I''m doing
something stupid. Either way, a fresh pair of eyes would help.
Basically I''m duplicating a fieldset within a form (so you can upload
more than one photo). [BTW, the fieldsets have a CSS id which relates
to the object id of the
2024 Jan 23
0
Quantiles of sums of independent discrete random variables
Greetings,
I have the following?
Problem:
Given k (=10) discrete independent random variables X_i with n_i (= 5 to 20) values each,compute quantiles of the distribution of the sum X = X_1+...+X_k.
Here X has n=n_1 x n_2 ... n_k distinct values which is too large to list them all together with
their probabilities.
I tried several approaches:
(A) Convolution:
each X_j is approximated with
2011 Jan 03
7
Saving objects inside a list
Hello there,
any ideas on how to save all the objects on my workspace inside a list
object?
For example, say my workspace is as follows
ls()
[1] "x" "y" "z"
and suppose I want to put these objects inside a list object, say
object.list <- list()
without having to explicitly write down their names as in
object.list$x = x
object.list$y = y
object.list$z = z
Is
2010 Nov 17
2
Numerical integration
Hi!
I was wondering if there are any other functions for numerical integration,
besides 'integrate' from the stats package, but which wouldn't require the
integrand to be vectorized. Oh, and must be capable of integrating over
(-inf,+inf).
Thanks in advance,
Eduardo Horta
[[alternative HTML version deleted]]
2010 Dec 13
2
Integration with LaTex and LyX
Hello,
Are there any packages which allow for a good integration between R and
LaTex / LyX? I'm interested mainly in automatic (automagic?) imports of
plots/graphics.
Thanks in advance and best regards,
Eduardo de Oliveira Horta
[[alternative HTML version deleted]]
2010 Nov 16
2
Vectors out of lists?
Hello there
I have a list, Y, and each component of that list is a real-valued function
(that is, Y[[i]](u) returns a number).
I was wishing to build the mean function and the first thing I thought of
was
Ybar<-function(u){
mean(Y[[1:n]](u))
}
but obviously this doesn't work, since Y[[1:n]] is not allowed at all.
Any elegant suggestions? I really would like to avoid something like
2010 Nov 15
3
Defining functions inside loops
Hello,
I was trying to define a set of functions inside a loop, with the loop index
working as a parameter for each function. Below I post a simpler example, as
to illustrate what I was intending:
f<-list()
for (i in 1:10){
f[[i]]<-function(t){
f[[i]]<-t^2+i
}
}
rm(i)
With that, I was expecting that f[[1]] would be a function defined by t^2+1,
f[[2]] by t^2+2 and so on.
2011 Jan 05
3
Adding lines in ggplot2
Hello,
this is probably a recurrent question, but I couldn't find any answers that
didn't involve the expression "data frame"... so perhaps I'm looking for
something new here.
I wanted to find a code equivalent to
> x=sqrt(1:10)
> y=log(1:10)
> plot(1:10, x, type="lines", col="darkgreen")
> lines(1:10, y, col="red")
to use with
2010 Dec 27
2
Finding indexes of minum and maximum elements of an array
Hello there
I wish to get the "coordinates" of the minimum element of an array.
For example, if the array were
> H = array(c(8:5,1:4),dim=c(2,2,2))
> H
, , 1
[,1] [,2]
[1,] 8 6
[2,] 7 5
, , 2
[,1] [,2]
[1,] 1 3
[2,] 2 4
then
> min(H)
[1] 1
and
> max(H)
[1] 8
Say "idx" were the function I'm looking for. Then, what
2010 Nov 16
2
Integrating functions / vector arithmetic
Hello,
I was trying to build some functions which I would like to integrate over an
interval using the function 'integrate' from the 'stats' package. As an
example, please consider the function
h(u)=sin(pi*u) + sqrt(2)*sin(pi*2*u) + sqrt(3)*sin(pi*3*u) + 2*sin(pi*4*u)
Two alternative ways to 'build' this function are as in f and g below:
coeff<-sqrt(1:4)
2011 Jan 27
2
pdf greek letter typos
Hi there,
yet on the topic of greek letters and pdf plotting: when I run the
following code
pdf(file="temp.pdf")
mu=seq(from=-pi, to=pi, length=100)
plot(mu, sin(mu^2),
type="l",
xlab=expression(mu%in%(list(-pi,pi))),
ylab=expression(sin(mu^2)),
main=expression((list(mu,sin(mu^2)))))
dev.off()
I get a "proportional to" symbol in place of a
2011 Jan 11
1
Alphabetic labels on multi-plot graphics
Is there a way to achieve
lbl=c("a", "b", "c", "d")
par(mfrow=c(2,2), ann=FALSE)
for (t in 1:4){
plot(seq(from=1,to=2*pi,length=100),
sin(t*seq(from=1,to=2*pi,length=100)), type="l")
title(main=paste("(", lbl[t], ")", sep=""))
}
without having to use an object like 'lbl'?
More generally: is it possible
2010 Dec 23
1
Removing elements of a list object
Hello,
say I have an object
> x = list(first = 10, second = 20, third = "Yeah!")
and want to remove the $second element of that list. My first try was, of
course,
> rm(x$second)
which gave me the following error message
> Error in rm(x$second) : ... must contain names or character strings
Any ideas here, folks?
Best regards, and Merry Christmas!
Eduardo Horta