Re: [R] svymeans question

2008-08-26 Thread James Reilly
to missing values than you expect. Does the following calculation give you the same results as in rr1? mean( lower_dat$W524787[ apply( lower_dat[lset], 1, function(x) !any(is.na(x)) ) ] ) James -- James Reilly Department of Statistics, University of Auckland Private Bag 92019, Auckland, New

Re: [R] Problems using rfImpute

2008-05-05 Thread James Reilly
The values NA and "NA" are different. The first is treated as missing; the second is not. For example, > table(factor(c(NA,"0","1","NA","NA"))) 0 1 NA 1 1 2 I suspect you have "NA" where you want NA, and this is causin

Re: [R] Imputation Packages

2008-03-03 Thread James Reilly
at the "Missing data" sections of the Multivariate and SocialSciences task views on CRAN: http://cran.r-project.org/web/views/ James -- James Reilly Department of Statistics, University of Auckland Private Bag 92019, Auckland, New Zealand __ R-

Re: [R] Studdy Missing Data, differentiate between a percent with in the valid answers and with in the different missing answers

2008-03-03 Thread James Reilly
special]), obs=(1:length(dataFrame$TWO))[special]) class(dataFrame$TWO) <- c("factor", "special.miss") is.na(dataFrame$TWO) <- special # Then describe gives new percentages describe(dataFrame$TWO) dataFrame$TWO n missing ? X unique 3

Re: [R] things that are difficult/impossible to do in SAS or SPSS but simple in R

2008-01-17 Thread James Reilly
served values. http://support.sas.com/onlinedoc/913/getDoc/en/proc.hlp/a002473736.htm#a003069171 I'm not aware of any way to do this in PROC FREQ, though. -- James Reilly Department of Statistics, University of Auckland Private Bag 92019, Auckland, New Zealand _

Re: [R] 4 questions regarding hypothesis testing, survey package, ts on samples, plotting

2007-12-19 Thread James Reilly
will give you the median, e.g. svyquantile(~b, design, 0.5, interval.type="score") Since a proportion is just the mean of a 0/1 variable, you can use svymean for that, e.g. svymean(~b1, design) HTH, James -- James Reilly Department of Statistics,

Re: [R] spss, string factors, selecting

2007-11-27 Thread James Reilly
1. What is the reason for matching on "FAT" and "FATMTD"? From your description of the data, I assume that "RINGNO" is the individual identifier. I'd have thought matching on that alone would be appropriate. 2. What happens if you omit the "all=T"

Re: [R] question regarding an error message from survey package

2007-11-24 Thread James Reilly
Your calibration model has one linear predictor, so it only has two parameters, but you have specified three population totals. A slightly different setup should work; try again with: st <- factor(1:3, levels=c(3, 1:2)) pop<-c('(Intercept)'=100, st1=10, st2=20) James Reil

Re: [R] survey weights in sample with replacement

2007-10-30 Thread James Reilly
mple with probability proportional to size. Hope this helps, James -- James Reilly Department of Statistics, University of Auckland Private Bag 92019, Auckland, New Zealand __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEAS

Re: [R] cross tabulation

2007-10-14 Thread James Reilly
in list2 are not counted twice, unlike in your code, but you could run it again just on the duplicates (and again on the triplicates, etc) if this is needed. Hope this helps, James -- James Reilly Department of Statistics, University of Auckland Private Bag 92019, Auckland, New Zealand ___

Re: [R] Mac GUI and .Renviron

2007-10-07 Thread James Reilly
On 7/10/07 3:49 AM, Rob J Goedman wrote: > I do not think you can, without some further steps, run multiple > R.apps at the same time. Let me know if that is critical for you. If you copy R.app, you can run each copy concurrently. James -- James Reilly Department of Statistics, Univers

Re: [R] Re-ordering factors

2007-10-06 Thread James Reilly
r= > + c("25-34","35-44","45-54","55-64",">64")) >> xtabs(Count ~ ed + agrp) > agrp > ed 25-34 35-44 45-54 55-64 >64 > CompletedHS 16431 1855 9435 8795 7558 > IncompleteHS 5416 5

Re: [R] Ambiguities in vector

2007-09-21 Thread James Reilly
h&AN=13663214&site=ehost-live } Hope this helps, James -- James Reilly Department of Statistics, University of Auckland Private Bag 92019, Auckland, New Zealand On 21/9/07 7:14 AM, Birgit Lemcke wrote: > First thanks for your answer. > Now I try to explain better: > > I have

Re: [R] Multiple R sessions, Mac version

2007-09-14 Thread James Reilly
ac OS X recently too (10.4.10). While running simultaneous R sessions under X11 or from the terminal works for me out of the box, the only way I've found to run simultaneous Aqua sessions is to make extra copies of R.app and run those. James -- James Reilly Department of Statistics, Univer

Re: [R] Missing data

2007-09-11 Thread James Reilly
The mice package might also be useful, especially the md.pattern function: http://finzi.psych.upenn.edu/R/library/mice/html/md.pattern.html James -- James Reilly Department of Statistics, University of Auckland Private Bag 92019, Auckland, New Zealand On 12/9/07 1:33 PM, Bill Pikounis wrote