I don't have access to S-PLUS 8 at the moment, but it may be that the
'survey' port to S-PLUS isn't recognising the ~1 and that you need ~id for
some identifier. That is, you need to create a variable that has a unique
level for each record and specify it in the id formula.
-thomas
On Tue, 5 Jun 2007, Walter R. Paczkowski wrote:
Hi,
I just loaded my new copy of 8.0 on Windows XP. I wanted to run a small
function I had written in R using the survey package to do a raking of
survey data. The function works perfectly under R. In S, however, I get
an error message:
Problem: Length of 1 (variable 1) is 1 != length of others (3560)
Use traceback() to see the call stack
Does anyone know what this means? This is for an SRS, nothing fancy.
The problem is with the svydesign function which I specify as
svydesign(ids = ~1, data = x)
where x is a dataframe with dimension 3560 by 3. Again, this worked
perfectly in R. Any insight?
Thanks,
Walt Paczkowski
_________________________________
Walter R. Paczkowski, Ph.D.
Data Analytics Corp.
44 Hamilton Lane
Plainsboro, NJ 08536
(V) 609-936-8999
(F) 609-936-3733
Thomas Lumley Assoc. Professor, Biostatistics
tlumley@u.washington.edu University of Washington, Seattle
|