, minimal, self-contained, reproducible code.
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
-guide.html
and provide commented, minimal, self-contained, reproducible code.
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle__
R-help@stat.math.ethz.ch mailing list
https
On Wed, 6 Dec 2006, Paul Roebuck wrote:
Assuming script 'common.q' contains code that needed
different processing depending on interpreter
(either S-PLUS or R), what should the condition be?
I believe
exists(is.R) is.R()
is a reliable condition.
-thomas
-- since this determines how
many different logistic models for treatment you will need.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle
__
R-help@stat.math.ethz.ch
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R
stiffer than in R.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
On Fri, 17 Nov 2006, Robin Hankin wrote:
OK, I see. But in algebra the + symbol is special: it is reserved
exclusively for associative and commutative operations [thus a+b+c is
always well-defined]; perhaps the parser could fall in with this
convention?
It's not so long ago that we had a
is that the title is defined ahead, passed to a function that makes
many plots, and n is incremented for each plot.
pretitle - quote(bold(Figure~.(N)~Plot~C[max]~versus CrCl))
## later on inside a function
N-1
title-do.call(bquote,list(pretitle))
-thomas
Thomas Lumley Assoc
On Tue, 14 Nov 2006, justin bem wrote:
Hi,
I want to compute the variance of two complex statistics. The first
statistic is the a ratio
R1=Q(a1)/Q(a2)
where Q denote de quantile at a1 and a2. The second is also a ratio but
not a classic one this ratio is
On Tue, 7 Nov 2006, yongchuan wrote:
I'm doing a cox regression with frailty:
model - coxph(Surv(Start,Stop,Terminated)~ X + frailty(id),table)
I understand that model$frail returns the group level frailty
terms. Does this mean this is the average of the frailty
values for the respective
On Wed, 1 Nov 2006, Fabian Scheipl wrote:
Calculating the smoother/projection matrix S: y - \hat y and then its
trace by sum(eigen(S))$values is what I've been doing so far- but I was
hoping there might be a more efficient way than doing the spectral
decomposition of an NxN-matrix.
Well,
.
The initial default is 'start'.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
On Tue, 24 Oct 2006, Joe W. Byers wrote:
following code produces a 5 element list of 2X5 random numbers that I
then convert to a 2X5X5 matrix.
cov-matrix(c(.4,-.1,-.1,.3),nrow=2,ncol=2)
rnds-NULL;
for (i in 1:5){
t1-rnorm(5,cov)
t2-rnorm(5,cov)
t3-rbind(t1,t2)
On Sat, 21 Oct 2006, Philipp Pagel wrote:
On Sat, Oct 21, 2006 at 11:04:13AM +0200, Patrick Giraudoux wrote:
Which means that actually sum(x) is NOT considered equal to 1...
Any idea about what is going wrong?
Others have already pointed out the problem and I would like to add a
reference
and flexible forestplot() function in the
'rmeta' package.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch
On Fri, 20 Oct 2006, Alberto Monteiro wrote:
An example:
n - 3
f - function(x) x^n
f(2)
# [1] 8
n - 2
f(2)
# [1] 4
f
# function(x) x^n
Ok, I know this is trivial, because function f is foverer bound
to the variable n. But how can I _fix_ n when I define _f_, so
that changing _n_
On Tue, 17 Oct 2006, Richard Graham wrote:
On 10/16/06, Björn Egert [EMAIL PROTECTED] wrote:
On 10/8/06, Egert, Bjoern [EMAIL PROTECTED] wrote:
Hello,
Is there a way in R to construct an (error correcting) binary code
e.g. for an source alphabet containing integers from 1 to say 255
On Sat, 14 Oct 2006, John Sorkin wrote:
R 2.2.0
windows XP
I am beginning to explore the mitools package contributed by Thomas
Lumley (thank you Thomas) and I have a few questions:
(1) In the examples given in the mitools documentation, the only family
argument used is family=binomial
On Fri, 13 Oct 2006, Michela Cameletti wrote:
Dear R users,
we are trying to do some parallel computing using library(snow).
In particular we have a cluster with 3 nodes
cl - makeCluster(3, type = MPI)
3 slaves are spawned successfully. 0 failed.
and we want to compute the
attributes(B) to look for the options ,but can't
find it, anybody knows how to get it?
vcov(your.model)
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle
__
R-help
On Tue, 10 Oct 2006, Martin C. Martin wrote:
Thanks, or even just:
e - environment(formula(f.lm))
But this was more of a bug report. Is update.default wrong? Should it
be changed? I don't see how evaluating in update's parent environment
would ever be better default behavior than the
distinct terms
to be added, and your code seems to be doing that as directly as
possible.
Not necessarily. It could be quicker to numerically invert the
characteristic function, which is easy to compute.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL
on, in that a vector of one number is the same as that number,
but a list of one function is not the same as the function.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle
(except for the
impractical one that requires pairwise sampling probabilities). I would
welcome suggested references (especially if they are in English).
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle
On Fri, 29 Sep 2006, [EMAIL PROTECTED] wrote:
Hi,
Two functions wilcox.exact and wilcox_test give slightly different
confidence intervals of the difference of the medians: for example
y-c(0,0,1.081,0.594,0,0.769,0,0.009,0,0,0.798,0.405,0.498,0.946,1.35,1.149,0.528)
x-c(rep(1,10),rep(2,7))
On Tue, 26 Sep 2006, Mollet, Fabian wrote:
Hello there!
I'm creacting a loop for(i in 1:n){...}within which I build a nls model
at each iteration. for some of the values of i, the algoritm in the nls
function doesn't converge or cannot find a solution and consequently an
error message is
with repetion ? I
try fpc1-rep(0,length(data)) I get a error message.
For sampling with replacement you just omit the fpc and specify the first-stage
id and the sampling weights
E3stage -svydesign(ids=~stageid1, weights=~weights)
-thomas
Thomas Lumley Assoc. Professor
On Fri, 22 Sep 2006, Thilo Kellermann wrote:
Hi,
the data of the model fit is stored in lm$model and should work
Not reliably. In the first place, you should use the accessor function
model.frame(model) rather than model$model, which works even if the model
was fitted with model=FALSE.
On Fri, 22 Sep 2006, X.H Chen wrote:
Hi Gabor,
Thanks for pointing out this for me. However, what I try to get is how to
construct such form a function f that
ret-f(...),
where ret contains the each recursive result from f, and meantime f consists
of no - operator. Do you have any idea
On Thu, 21 Sep 2006, Anaid Diaz wrote:
Hi
I am using R to fit a survival function to my data
(with a weibull distribution).
Data: Survival of individuals in relation to 4
treatments ('a','b','c','g')
syntax:
survreg(Surv(date2)~males2, dist='weibull')
But I have some problems
(matrices) there are only four possible sums over one
margin: x %*% y, y%*%x, crossprod(x,y), tcrossprod(x,y), but with rank-3
tensors there are a lot more options.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington
)
}
carrier.name - function(term) {
if (length(term) 1)
carrier.name(term[[2]])
else as.character(term)
}
to do the job.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle
On Sun, 3 Sep 2006, Geoff Russell wrote:
Hi,
I'm reading van Belle et al Biostatistics and trying to run a cox test
using a dataset from:
http://faculty.washington.edu/~heagerty/Books/Biostatistics/chapter16.html
(Primary Biliary Cirrhosis data link at top of the page),
I'm using the
. More importantly, although it would be easy to
not draw the x axis, it wouldn't help at all, since axis() still wouldn't
work.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle
On Thu, 31 Aug 2006, MARK LEEDS wrote:
you would have to take your series, y_1, ... y_t and run it over various
values of alpha ( say zero to 1 insteps of .01 ) and see which one gives say
the least MSE.
but that will be the optimal alpha for the window you are looking at. it
doesn't mean it
On Wed, 30 Aug 2006, Rick Bischoff wrote:
Unfortunately, it seems that most(all?) of R's graphics and summary
statistic functions don't take a weight or frequency argument.
(Fortunately the models do...)
I have been been meaning to add this functionality to my graphics
package ggplot
On Tue, 29 Aug 2006, Erin Hodgess wrote:
Dear R People:
I am trying to split a character vector into a set of individual
letters:
Ideal:
x3 - c(dog)
d o g
I tried the following:
strsplit(x3)
Error in strsplit(x3) : argument split is missing, with no default
strsplit(x3,1)
[[1]]
[1]
which will compute the cofactor of
matrix A or the adjoint of a real matrix A?
If that's what you mean by adjoint, then the adjoint is the inverse
multiplied by the determinant.
adjoint-function(A) det(A)*solve(A)
-thomas
Thomas Lumley Assoc. Professor
). There's a conference in New Zealand in February and abstract
submissions are still open.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle
__
R-help@stat.math.ethz.ch
biglm fits linear and generalized linear models to large data sets, using
bounded memory.
What's New: generalized linear models.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle
).
You need to change
#define NCONNECTIONS 50
at the top of src/main/connections.c and recompile.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle
__
R-help
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R
On Wed, 23 Aug 2006, Eduardo Leoni wrote:
I created this function following Farnsworth
(http://cran.r-project.org/doc/contrib/Farnsworth-EconometricsInR.pdf)
demean - function(x,index) {
for (i in unique(index)) {
for (j in 1:ncol(x)) {
x.now - x[index==i,j]
x[index==i,j] -
the covariance may be useful even for non-mathematicians. Call
the three points X,Y,Z
cov(X-Y, Y-Z) = cov(X,Y)-cov(Y,Y)-cov(X,Z)+cov(Y,Z)
=0- var(Y) -0 -0
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED
= random)
It means that NaNs were produced. You should be able to see where from
the output. It's hard to say more without more information.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle
that isn't making use of vectorized functions in R.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch
On Wed, 23 Aug 2006, Damien Moore wrote:
Thomas Lumley wrote:
No, it is quite straightforward if you are willing to make multiple passes
through the data. It is hard with a single pass and may not be possible
unless the data are in random order.
Fisher scoring for glms is just
On Wed, 23 Aug 2006, Damien Moore wrote:
Thomas Lumley [EMAIL PROTECTED] wrote:
I have written most of a bigglm() function where the data= argument is a
function with a single argument 'reset'. When called with reset=FALSE the
function should return another chunk of data, or NULL
On Mon, 21 Aug 2006, Damien Moore wrote:
For very large regression problems there is the biglm package (put you
data into a database, read in 500,000 rows at a time, and keep updating
the fit).
thanks. I took a look at biglm and it seems pretty easy to use and,
looking at the source,
On Tue, 22 Aug 2006, Rick Bilonick wrote:
On Wed, 2006-08-23 at 06:43 +1000, Andrew Robinson wrote:
Rick,
if by marginal prediction, you mean the prediction without random
effects, then use the level argument. See ?predict.lme or ?fitted.lme
If not then I don't know :)
Cheers
Andrew
@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED
On Mon, 21 Aug 2006, Debarchana Ghosh wrote:
Hi,
I'm trying to compute survey svytable statistic on subsets by using the
svyby function.
Here is the code:
b-svyby(~V024+V751, by=~V025, design=strat2, svytable, round=TRUE)
The vars, V024, V751 and V025 are factors. The by var has 2
agree then the files are the same as when the installer was
built. There is negligible probability that a change in the file will leave
the MD5 hash the same.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington
the file format.
I will look at adding an option to specify an encoding and ignore the
translation table, but not very urgently.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington
On Thu, 3 Aug 2006, Thomas Kuster wrote:
Hello
Am Mittwoch, 2. August 2006 17.11 schrieb Thomas Lumley:
This sounds like a conflict between encodings -- eg if R is assuming UTF-8
and the file is encoding in Latin-1 then the sequence
U+00FC : LATIN SMALL LETTER U WITH DIAERESIS
U+0072 : LATIN
On Thu, 3 Aug 2006, Daniel Gerlanc wrote:
Hello all,
Consider the following problem:
There are two vectors:
rows - c(1, 2, 3, 4, 5)
columns - c(10, 11, 12, 13, 14)
I want to create a matrix with dimensions length(rows) x length(columns):
res - matrix(nrow = length(rows), ncol =
because get() looks in the environment it was called from,
which is df1.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle
__
R-help@stat.math.ethz.ch mailing list
/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle
__
R-help@stat.math.ethz.ch mailing list
to
modify the translation table to allow the accented characters.
It looks as though SPSS .sav files don't have this limitation.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle
SPSS files than the code in the foreign package, and that could be
adapted.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle__
R-help@stat.math.ethz.ch mailing
, reproducible code.
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting
On Tue, 1 Aug 2006, Swidan, Firas wrote:
Hi,
R is having the following weird behavior and I am not sure if that is a
feature or a bug:
It's a feature. And a very old FAQ (#7.5)
I am working on the following 3D array:
bIm
, , 1
[,1]
[1,] TRUE
[2,] TRUE
[3,] TRUE
[4,] TRUE
[5,]
of the scale.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
On Fri, 28 Jul 2006, johan Faux wrote:
hello everybody,
I have some code which looks like:
dyn.load(lpSolve.so)
res - lp(some.parameters)
and everything runs fine.
What lp() does, it's just calling a C function which is in lpSolve.so
If I call lp() a large number of times:
for(1 in
as the input, and reducing functions, which
return a vector of length 1.
The == operator is vectorized, but if() requires a condition of length 1,
so they don't match. The solution is to apply some reducing function.
Two possible options are length() and (as you found) any().
-thomas
Thomas
point may
come close (there was a message yesterday from someone trying to interface
pari/gp, which does this, with R).
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle
. New York: John Wiley and Sons.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r
On Fri, 21 Jul 2006, Valentin Dimitrov wrote:
Dear Leaf,
I modified your code as follows:
gamma.fun - function(mu,sd,start=100)
{
f.fn - function(alpha)
{abs(sd^2-mu^2/(gamma(1+1/alpha))^2*(gamma(1+2/alpha)-(gamma(1+1/alpha))^2))}
alpha - optim(start, f.fn)
beta -
in this discussion is probably the better route.
The main remaining problem in my code is that with super=TRUE it will
report all inherited methods, even where more specific methods override
them. That should be fixable.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL
, minimal, self-contained, reproducible code.
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
the problem?
You can specify Hess=TRUE in the original polr() call so that refitting
would not be necessary. This is sensible anyway if you know you are going
to be computing standard errors.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Thomas Lumley
-allGenerics()@.Data
sigs-lapply(gens, function(g) linearizeMlist(getMethods(g))@classes)
names(sigs)[EMAIL PROTECTED]
sigs-lapply(sigs, function(gen){ gen[unlist(sapply(gen, function(sig)
any(sig %in% classes)))]})
sigs[sapply(sigs,length)0]
}
Thomas Lumley Assoc. Professor
On Mon, 17 Jul 2006, John Wiedenhoeft wrote:
Hi there,
I'm having myself a hard time writing an algorithm for finding patterns
within a given melody. In a vector I'd like to find ALL sequences that
occur at least twice, without having to check all possible patterns via
pattern matching.
well over the years.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE
://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington
linearisation standard errors,
but that would require writing out the loglikelihood and its gradient,
which is tedious (although you could borrow most of it from MASS::polr)
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University
$double.eps, treating the
errors as a random walk, and this is not far off (though perhaps only
coincidentally so).
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle
with that size of data set for most
analyses. You might come across some analyses (eg some cluster analysis
functions) that use n^2 memory for n observations and so break down.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University
.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http
at the code it seems that you need vartype=greenwood, so the
documentation is wrong.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle__
R-help@stat.math.ethz.ch
in a lexical parent environment
it makes no sense to do it directly at the command line.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle
__
R-help
using
survreg() in the survival package.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman
of the total (with the corrections
above) on this variable also gives
sqrt(var.yT)
[1] 5.54824
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle
__
R-help
-of-implementation
issue and partly because of theoretical difficulties with, eg, lms().
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle
__
R-help@stat.math.ethz.ch
On Mon, 3 Jul 2006, John Sorkin wrote:
R 2.2 on windows XP
I have a dataset with multiple columns. Some of the columns represent
independent variables, some represent dependent variables. I would like
to run the same analyses on a fixed set of independent variables,
changing only the
On Fri, 30 Jun 2006, Philip He wrote:
Doese anyone know a R function to find the median of a gamma distribution?
It's not clear what you mean. If you know the parameters of a gamma
distribution then qgamma() will give you any quantile.
If you have data and want to estimate the median then
On Fri, 30 Jun 2006, Long Qu wrote:
Hi there:
I'd thought these two versions of noncentral t-distribution are essentially
the same:
qqplot(rt(1000,df=20,ncp=3),qt(runif(1000),df=20,ncp=3))
But, the scales of the x-axis and the y-axis are quite different according
to the QQ-plot.
=20,ncp=3),from=-10,to=-2,n=1000)
The fix is less obvious here. I'll file it as a bug.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle
__
R-help@stat.math.ethz.ch
On Thu, 29 Jun 2006, Xiaohua Dai wrote:
Hi R users,
Hope the question is not too simple:
How to use a for loop to generate two lists as below:
testlist - list(test1, test2, ..., test1000)
stringlist - list(test1,test2,...,test1000)
I don't know why you would want to use a for loop:
On Tue, 27 Jun 2006, Christian Hennig wrote:
Dear list,
I did simulations in which I generated 1
independent Bernoulli(0.5)-sequences of length 100. I estimated
p for each sequence and I also estimated the conditional probability that
a one is followed by another one (which should be p
On Tue, 27 Jun 2006, Thomas Lumley wrote:
I got the table wrong, it should read
x1/0 1/1 est11
000 - - -
001 - - -
010 1 0 0
011 0 1 1
100 1 0 0
101 1 0 0
110 1 1 0.5
111 0 2 1
So the explanation is slightly
On Mon, 26 Jun 2006, [EMAIL PROTECTED] wrote:
Hi : I think I need to use sapply but I can't figure this out.
Suppose I have two vectors : tempa ( 4, 6,10 ) and tempb
( 11,23 ,39 )
I want a function that returns 4:11,6:23 and 10:39 as vectors.
I tried :
sapply(1:length(tempa) function
On Fri, 23 Jun 2006, Rogério Rosa da Silva wrote:
Dear All,
My doubt about how to integrate a simple kernel density estimation goes on.
I have seen the recent posts on integrate density estimation, which seem
similar to my question. However, I haven't found a solution.
I have made two simple
[[alternative HTML version deleted]]
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Thomas Lumley Assoc. Professor
On Wed, 14 Jun 2006, Martin Henry H. Stevens wrote:
Hi folks,
Warning: I don't know if the result I am getting makes sense, so this
may be a statistics question.
The fitted values from my binomial lmer mixed model seem to
consistently overestimate the cell means, and I don't know why. I
:
(n/(n-1))*((N-sum(nh))/N)*sum(yr2*(Nh/nh)^2)/(N*N)
[1] 0.45393
where yr2-by(yres^2,age$stratum,sum). These agree exactly with R's
estimates
vcov(svytotal(~y, design=age.post))
y
y 330.915
vcov(svymean(~y, design=age.post))
y
y 0.45393
-thomas
Thomas Lumley
30 4 30.292 0.139 0.11480.741
40 2 10.194 0.122 0.05690.664
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle
be par(ask=TRUE). However,
when I have this problem I usually just send all the plots to a PDF file,
so I can page through them at my leisure.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle
101 - 200 of 1136 matches
Mail list logo