You should look at the examples in the documentation to make sure which
weight option you want to use as there are several of them in survey.xxx
models.
Kosuke
--
Department of Politics
Princeton University
Yes and yes, until the warning turns into an
error.
On Tue, Jan 19, 2010 at 4:35 PM, Casey Klofstad <klofstad(a)gmail.com>
wrote:
>
> Ok, that plus finding a missing variable seems to have done it. I still
> get:
>
> Warning message:
> In poisson(link = link) : use of poisson(link=link) is deprecated
>
> Is that due to the survey package? If so, I can ignore that, right?
>
> THANKS!
>
> Best,
>
> -c
>
> On Tue, Jan 19, 2010 at 4:32 PM, Kosuke Imai <kimai(a)princeton.edu>
> wrote:
>>
>> I think your weights should be in the form of
>>
>> weights = ~ weights
>>
>> see demo(logit.survey) for example.
>>
>> Kosuke
>>
>> --
>> Department of Politics
>> Princeton University
>>
http://imai.princeton.edu
>>
>> On Tue, 19 Jan 2010, Casey Klofstad wrote:
>>
>>> The model runs when I take out the weight variable. When I add it
>>> back
>>> in
>>> I get:
>>>
>>> "Error in 1/as.matrix(weights) : non-numeric argument to binary
>>> operator"
>>>
>>> I load my data into R from a csv file. Do I somehow need to transform
>>> the data to make sure it is numeric? Maybe R thinks the data are
>>> character strings?
>>>
>>> Thanks much,
>>>
>>> -c
>>>
>>> On Tue, Jan 19, 2010 at 4:18 PM, Kosuke Imai <kimai(a)princeton.edu>
>>> wrote:
>>>>
>>>> Also you may need to update your R to 2.10-1...
>>>>
>>>> Kosuke
>>>>
>>>> --
>>>> Department of Politics
>>>> Princeton University
>>>>
http://imai.princeton.edu
>>>>
>>>> On Tue, 19 Jan 2010, Casey Klofstad wrote:
>>>>
>>>>> I tried to update Zelig and all I find is version 3.4-5. I tried
>>>>>
"source("http://gking.harvard.edu/zelig/install.R")" as well as
>>>>> "update.packages()".
>>>>>
>>>>> Best,
>>>>>
>>>>> -c
>>>>>
>>>>> On Tue, Jan 19, 2010 at 4:01 PM, Casey Klofstad
>>>>> <klofstad(a)gmail.com>
>>>>> wrote:
>>>>>>
>>>>>> Hey all. Survey is version 3.18. Updating Zelig now...
>>>>>>
>>>>>> On Tue, Jan 19, 2010 at 3:54 PM, Kosuke Imai
<kimai(a)princeton.edu>
>>>>>> wrote:
>>>>>>>
>>>>>>> Also, please try the latest version of Zelig, which is
3.4-8.
>>>>>>>
>>>>>>> Kosuke
>>>>>>>
>>>>>>> --
>>>>>>> Department of Politics
>>>>>>> Princeton University
>>>>>>>
http://imai.princeton.edu
>>>>>>>
>>>>>>> On Tue, 19 Jan 2010, Olivia Lau wrote:
>>>>>>>
>>>>>>>> What version of survey (the R package) are you using?
>>>>>>>>
>>>>>>>> On Tue, Jan 19, 2010 at 2:44 PM, Casey Klofstad
>>>>>>>> <klofstad(a)gmail.com>
>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>> Hey all-
>>>>>>>>>
>>>>>>>>> I'm trying to run a weighted Poisson model (I
did full matching
>>>>>>>>> and
>>>>>>>>> need to weight the model). The code looks like this:
>>>>>>>>>
>>>>>>>>> z.out <- zelig(polact ~ treat + pid_str + q44 +
q52 + contact,
>>>>>>>>> weights="weights", data = mi(ds1, ds2, ds3,
ds4, ds5), model =
>>>>>>>>> "poisson.survey")
>>>>>>>>>
>>>>>>>>> I get these errors:
>>>>>>>>>
>>>>>>>>> Error in 1/as.matrix(weights) : non-numeric argument
to binary
>>>>>>>>> operator
>>>>>>>>> In addition: Warning message:
>>>>>>>>> In poisson(link = link) : use of poisson(link=link)
is
>>>>>>>>> deprecated
>>>>>>>>>
>>>>>>>>> I am running version 3.4-5 in Windows 7.
>>>>>>>>>
>>>>>>>>> Any thoughts?
>>>>>>>>>
>>>>>>>>> Thanks much,
>>>>>>>>>
>>>>>>>>> -c
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Casey A. Klofstad
>>>>>>>>> University of Miami
>>>>>>>>> Department of Political Science
>>>>>>>>> Coral Gables, FL
>>>>>>>>>
>>>>>>>>> klofstad(a)gmail.com
>>>>>>>>>
http://www.as.miami.edu/personal/cklofstad/
>>>>>>>>>
>>>>>>>>> -
>>>>>>>>> Zelig Mailing List, served by Harvard-MIT Data
Center
>>>>>>>>> Send messages: zelig(a)lists.gking.harvard.edu
>>>>>>>>> [un]subscribe Options:
>>>>>>>>>
http://lists.gking.harvard.edu/?info=zelig
>>>>>>>>> Zelig program information:
http://gking.harvard.edu/zelig/
>>>>>>>>>
>>>>>>>>
>>>>>>>> -
>>>>>>>> Zelig Mailing List, served by Harvard-MIT Data Center
>>>>>>>> Send messages: zelig(a)lists.gking.harvard.edu
>>>>>>>> [un]subscribe Options:
>>>>>>>>
http://lists.gking.harvard.edu/?info=zelig
>>>>>>>> Zelig program information:
http://gking.harvard.edu/zelig/
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Casey A. Klofstad
>>>>>> University of Miami
>>>>>> Department of Political Science
>>>>>> Coral Gables, FL
>>>>>>
>>>>>> klofstad(a)gmail.com
>>>>>>
http://www.as.miami.edu/personal/cklofstad/
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>>
>>>
>>
>
>
>
> --
> Casey A. Klofstad
> University of Miami
> Department of Political Science
> Coral Gables, FL
>
> klofstad(a)gmail.com
>
http://www.as.miami.edu/personal/cklofstad/
>
-
Zelig Mailing List, served by Harvard-MIT Data Center
Send messages: zelig(a)lists.gking.harvard.edu
[un]subscribe Options:
http://lists.gking.harvard.edu/?info=zelig
Zelig program information:
http://gking.harvard.edu/zelig/