[Rsiena-help] setParameter and interactions between the behavior and attribute variables in the selection part

Ruth M. Ripley ruth at stats.ox.ac.uk
Sat Mar 6 13:07:28 CET 2010


Dear Chip,

Sorry, one typo and one half instruction! I missed out 'x ses' in the
second line:

myeff[myeff$effectName=='behavior roken: influence interaction? x ses
 '&myeff$type=='eval', 'parm' ]<-2

and setEffect will need interaction2 set to the name of the network. It
defaults to blank.

setEffect(myeff, inflIntX, name="roken", interaction1="ses", parameter=2,
interaction1='networkname')

Also note the shortName has lower case starting i.

Either worked for me, with these changes.

Regards,

Ruth
--
Ruth M. Ripley,                         Email:ruth at stats.ox.ac.uk
Dept. of Statistics,                    http://www.stats.ox.ac.uk/~ruth/
University of Oxford,                   Tel:   01865 282851
1 South Parks Road, Oxford OX1 3TG, UK  Fax:   01865 272595


On Sat, 6 Mar 2010, Huisman, Chip wrote:

> Dear Ruth,
>
> I am sorry to bother you again but if I use:
>
> > myeff[myeff$effectName=='behavior roken: influence interaction? x ses'& myeff$type=='eval', 'include' ]=TRUE
> >
>
> I get this message:
>
> Error in x$FRAN(z, x, INIT = TRUE, ...) :
>   Internal parameter should be in the range [1,3]
>
> and if I use
>
> setEffect(myeff, InflIntX, name="roken", interaction1="ses", parameter=2)
>
> I get:
> Error in setEffect(myeff, InflIntX, name = "roken", interaction1 = "ses",  :
>   Effect not found
>
>
> Best regards,
>
> Chip
>
>
> -----Oorspronkelijk bericht-----
> Van: Ruth M. Ripley [mailto:ruth at stats.ox.ac.uk]
> Verzonden: vr 5-3-2010 21:50
> Aan: Huisman, Chip
> CC: rsiena-help at r-forge.wu-wien.ac.at
> Onderwerp: Re: [Rsiena-help] setParameter and interactions between the behavior and attribute variables in the selection part
>
> Dear Chip,
>
> I can only help with the first question, and I am sorry I was not very
> clear in my previous answer concerning this.
>
> The effect name does not need to have the 2. You need something like
>
> myeff[myeff$effectName=='behavior roken: influence interaction? x ses'&
> myeff$type=='eval', 'include' ]=TRUE
>
> and
>
> myeff[myeff$effectName=='behavior roken: influence interaction2'&
> myeff$type=='eval', 'parm' ]<-2
>
> or
>
> setEffect(myeff, InflIntX, name="roken", interaction1="ses", parameter=2)
>
> with possibly interaction2="mynet1" if you have more than one network.
>
> includeInteraction is for user specified interactions, and is only for
> network ones at present. setParameter has been expanded into setEffect,
> which is in all the current versions (I think!), even of the manual.
>
> The other questions require more modelling expertise than I have.
> Hopefully some other reader will help. Or try the Stocnet/Siena group...
>
> Regards,
>
> Ruth
> --
> Ruth M. Ripley,                         Email:ruth at stats.ox.ac.uk
> Dept. of Statistics,                    http://www.stats.ox.ac.uk/~ruth/
> University of Oxford,                   Tel:   01865 282851
> 1 South Parks Road, Oxford OX1 3TG, UK  Fax:   01865 272595
>
>
> On Fri, 5 Mar 2010, Huisman, Chip wrote:
>
> > Dear m,
> >
> > I've got 3 questions
> > 1. I'm trying do make interactions in the influence part of the model using:
> >
> > myeff[myeff$effectName=='behavior roken: influence interaction2'& myeff$type=='eval', 'include' ]=TRUE
> >
> > were interaction2 is the attribute variable SES, but it doesn't work.
> > I know I have to set the 'parm' column on 1 2 or 3, but how do I do this using R function without the GUI?
> > I also tried for the selection part:
> >
> > myeff <- includeInteraction(myeff, egoX, recip,interaction1="ses")
> > myeff <- setParameter(myeff, outInv, 3)
> > but R gives me the following massage:
> > Error: could not find function "setParameter"
> >
> > 2. I want to do make an interaction between an attribute variable  and the behavior variable
> > in the selection part of the model.
> > to exemplify: I try to test the hypothesis: smoking students from lower SES backgrounds have a stronger preference for smoking friends.
> > Is it possible to program that? I tried to make a changing covariate SESxsmoking, but I only have to waves, and according to the tutorial (page 28) that doesn't make sense. So I figured that I make a interaction SESxsmoking on basis of the smoking scores of the first wave and use it as a covariate. But I have a feeling that this is not correct.
> >
> >
> > 3. I would like to use dummies as is usual in ols regression in the influence part of the model for the main effects of an attribute variable. Does this work in the same way as in ols regression, in the sense that I have to leave out one reference category?
> > Important to know is that I cannot use the fix(myeff), I have to edit the dataframe directly with R functions.
> > I hope you can help me out.
> >
> > Best regards,
> >
> >
> >
> >
> >
> >
>
>
>
>
>
>




More information about the Rsiena-help mailing list