[Rsiena-help] new problem
Ruth M. Ripley
ruth at stats.ox.ac.uk
Thu Sep 8 10:49:07 CEST 2011
Dear Maarten,
The first problem is because use is a matrix, and therefore the wrong size
to select actors with.
The second version has the correct sort of definition for use. I cannot
see anything obviously wrong with the definition of peer, but it is not a very
good idea to overwrite the covariate matrix with the object, in case you
run part of the code again.
Can you confirm the dimensions of both versions of peer, please:
dim(peer) and the length of use: length(use)
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 Thu, 8 Sep 2011, maarten van zalk wrote:
> Dear Ruth,
>
> I actually have a new (or perhaps additional) problem: I do not get the same
> error when I try with another syntax, but I still get the following error
> (see below).
>
> iot says the size is incorrect, but they are the same size (if you run this
> without the selection and "use" command, it works fine).
>
> I even removed all the missings in all of the files, but still get this
> error....
>
> Hope you can help me!
>
>
> Kind regards,
>
> Maarten
>
> Last login: Thu Sep 8 10:20:17 on ttys000
> PC112-179:~ maartenselfhout$ r
>
> R version 2.13.1 (2011-07-08)
> Copyright (C) 2011 The R Foundation for Statistical Computing
> ISBN 3-900051-07-0
> Platform: i386-apple-darwin9.8.0/i386 (32-bit)
>
> R is free software and comes with ABSOLUTELY NO WARRANTY.
> You are welcome to redistribute it under certain conditions.
> Type 'license()' or 'licence()' for distribution details.
>
> R is a collaborative project with many contributors.
> Type 'contributors()' for more information and
> 'citation()' on how to cite R or R packages in publications.
>
> Type 'demo()' for some demos, 'help()' for on-line help, or
> 'help.start()' for an HTML browser interface to help.
> Type 'q()' to quit R.
>
>> setwd("/Users/maartenselfhout/Desktop/DAT files")
>> library(RSiena)
>> library(snow)
>> library(rlecuyer)
>> library(xtable)
>> mum <- as.matrix(read.table("SupportMom.dat"))
>> use <- mum[, 1] %in% c(4, 5)
>> net.w1 <- as.matrix(read.table("nw3r.dat"))
>> net.w2 <- as.matrix(read.table("nw4r.dat"))
>> net.w3 <- as.matrix(read.table("nw5r.dat"))
>> peer <- as.matrix(read.table("SupportPeers2.dat"))
>> friend <- sienaNet(array(c(net.w1[use, use], net.w2[use, use], net.w3[use,
>> use]), dim=c(2529, 2529, 3)))
>> soc <- as.matrix(read.table("Shyness2.dat"))
>> soc <- sienaNet(soc [use, ], type="behavior")
>> peer <- varCovar(val = peer [use, ])
>> mydata <- sienaDataCreate(friend, soc, peer)
> Error in sienaDataCreate(friend, soc, peer) :
> changing covariate incorrect size: peer
>>
>
More information about the Rsiena-help
mailing list