s-news
[Top] [All Lists]

Re: Survey design in S+8

To: <tlumley@u.washington.edu>, <dataanalytics@earthlink.net>
Subject: Re: Survey design in S+8
From: "Patrick Aboyoun" <aboyoun@insightful.com>
Date: Wed, 6 Jun 2007 01:48:41 -0700
Cc: <s-news@lists.biostat.wustl.edu>
Thread-index: AceoBDQa6nkHIhH6RgS2zZs8Q4qCxwAE0eAv
Thread-topic: [S] Survey design in S+8
Walter,
Thomas's workaround will solve your problem. When I created an S-PLUS port of
Thomas's survey package, I encountered some subtle differences between R and
S-PLUS. Although I was able to resolve most of them, the handling of ~1
escaped me. I'll make a note to myself to give this another try in future
updates.
 
Cheers,
Patrick

  

-----Original Message-----
From: s-news-owner@lists.biostat.wustl.edu
<s-news-owner@lists.biostat.wustl.edu>
To: Walter R. Paczkowski <dataanalytics@earthlink.net>
CC: s-news@lists.biostat.wustl.edu <s-news@lists.biostat.wustl.edu>
Sent: Tue Jun 05 23:29:34 2007
Subject: Re: [S] Survey design in S+8


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
--------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu.  To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
the BODY of the message:  unsubscribe s-news
<Prev in Thread] Current Thread [Next in Thread>