RE: [R] Protocol for answering basic questions

2004-12-01 Thread Baskin, Robert
number.of.years.using.R * runif(1) [1] 1.064863 I waited this many hours before responding:) First, let me say thank you very much to the R team for ...the software ...the help-list ...other intangibles. I am a relatively new R user and I am struggling in my own way to learn R. I follow the

RE: [R] decompose a correlation matrix

2004-09-23 Thread Baskin, Robert
This may not have things in the order you want but you can see if it gets close to what you want: x - matrix(1:16,ncol=4) x [,1] [,2] [,3] [,4] [1,]159 13 [2,]26 10 14 [3,]37 11 15 [4,]48 12 16 y - x[row(x) col(x)] y [1] 5 9 10 13 14

RE: [R] glmm

2004-09-02 Thread Baskin, Robert
I believe in the earlier discussion it was Spencer Graves that pointed out that there is earlier work by DuMouchel using design information but not weights as predictors. The reference for the use of design weights as predictors is: Start insert from earlier email 9. Pfeffermann, D. , Skinner,

RE: [R] or of a logical vector

2004-08-05 Thread Baskin, Robert
I don't know how careful about coercing type you need to be. Something like TRUE %in% outer(v,v,|) may work for you but simpler functions that do arithmetic and coerce the answer back to logical [e.g., as.logical(max(v))] might suffice. xt - c(T,T,T) xf - c(T,F,F) outer(xt, xf, |) [,1]

RE: [R] Order of messgaes/ missing messages

2004-08-04 Thread Baskin, Robert
It has to do with the topology of the web - if you are web-wise closer to the responder than the original sender you can receive the answer before the question - even if both answer and question go only to the list. I learned this suscribed to SAS-L when I was at UF - I was downstream from Bob

RE: [R] Permutations

2004-07-13 Thread Baskin, Robert
I may be confused, but I think what you described will produce greater than 472 million permutations. I think your second permutation 1 2 4 | 3 5 6 | 7 8 9 | 10 11 12 YES-2nd permutation shows that you want more than just a permutation of entire blocks. There are a total of 12! (12

RE: [R] mixed models for analyzing survey data with unequal selec tion probability

2004-05-20 Thread Baskin, Robert
Han-Lin I don't think I have seen a reply so I will suggest that maybe you could try a different approach than what you are thinking about doing. I believe the current best practice is to use the weights as a covariate in a regression model - and bytheway - the weights are the inverse of the

RE: [R] sampling weights for lme

2004-05-07 Thread Baskin, Robert
I would like to run a linear *mixed effects* model and also to use (sample) weighting ... I've been trying to do this for 2 decades :) See 9. Pfeffermann, D. , Skinner, C. J. , Holmes, D. J. , Goldstein, H. , and Rasbash, J. (1998), ``Weighting for unequal selection probabilities in multilevel

RE: [R] Complex sample variances

2004-04-14 Thread Baskin, Robert
Construct a new weight within the stratum as the sample weight multiplied by the frequency The correct formula for the new weights can be found in Chapter 6 of Shao and Tu (1996) The Jackknife and the Bootstrap, Springer Also in: Keith Rust Jon Rao have an overview article in Statistical

RE: [R] Curious about nomenclature: random deviates

2004-04-06 Thread Baskin, Robert
Does anyone know why they're called random deviates, as opposed to random numbers? Others will probably give you some technical reason about random numbers can be considered as random deviates from a mean (I think at least the 1875 Galton paper at http://www.mugu.com/galton/ uses similar

RE: [R] First Variable in lm

2004-03-24 Thread Baskin, Robert
First: Thanks to everyone who develops R, maintains r-help, and participates in the list :) This is a silly follow up question. From Andy Liaw: dat - data.frame(y=rnorm(10), x1=rnorm(10), x2=rnorm(10)) (Silly question - if the answer is on the lm or formula help page I didn't get it:) Why