[Rsiena-help] Error in Print01Report for multigroup analysis
Tom Snijders
Tom.Snijders at nuffield.ox.ac.uk
Thu Feb 26 10:22:08 CET 2015
Dear Marco,
I think I fixed it.
You should put the attached file somewhere (e.g. your current directory)
And give a command such as
insertSource("C:\\Users\\tom.snijders\\Documents\\RSienaRForge\\pkg\\RSienaTest\\R\\sienaDataCreate.r",
package='RSienaTest')
(with your pathname inserted and RSiena instead of RSienaTest, depending on which package you are using).
If this is not OK, please let me know!
This will be corrected in the next R-Forge release.
Thank you for the bug report!
Best wishes,
Tom
================================================================
Tom A.B. Snijders
Professor of Statistics and Methodology
Dept. of Sociology, University of Groningen
Emeritus Fellow, Nuffield College, University of Oxford
Associate Member, Dept. of Statistics, University of Oxford
http://www.stats.ox.ac.uk/~snijders/
From: marco tonellato [mailto:m.tonellato at gmail.com]
Sent: 25 February 2015 17:49
To: Tom Snijders
Subject: Re: [Rsiena-help] Error in Print01Report for multigroup analysis
Hi Tom,
here are the data object and the simplified script.
Basically I have 7 groups and two network waves (advice) + one constant dyadic covariate (energy) for each group.
This is the error I get when trying print01Report
Error in format(round(atts$meanp[j], 3), nsmall = 3, width = 10) :
error in evaluating the argument 'x' in selecting a method for function 'format': Error in round(atts$meanp[j], 3) :
non-numeric argument to mathematical function
I just found out that when I exclude the dyadic covariate the print01Routine works fine, so the problem must be related to that.
However, even excluding the dyadic covariate, when I include effects and launch siena07 I get another error message, this one:
Error : .onLoad failed in loadNamespace() for 'tcltk', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/usr/lib/R/library/tcltk/libs/tcltk.so':
libtk8.6.so<http://libtk8.6.so>: cannot open shared object file: No such file or directory
Error: package or namespace load failed for ‘tcltk’
Error in exitfn() : could not find function "tkdestroy"
it looks like it is not able to load a package / call a function (I'm using RSiena 1.1.278 on my local machine)
Thank you very much for taking a look
Marco
On Wed, Feb 25, 2015 at 5:03 PM, marco tonellato <m.tonellato at gmail.com<mailto:m.tonellato at gmail.com>> wrote:
Thank you for your help Tom.
I'm preparing the data object (it's not too big) and sending it to you.
All the best,
Marco
On Wed, Feb 25, 2015 at 4:56 PM, Tom Snijders <Tom.Snijders at nuffield.ox.ac.uk<mailto:Tom.Snijders at nuffield.ox.ac.uk>> wrote:
Dear Marco,
If you send me the data object used (or is it too large to send?) I can try to have a look.
Cheers,
Tom
================================================================
Tom A.B. Snijders
Professor of Statistics and Methodology
Dept. of Sociology, University of Groningen
Emeritus Fellow, Nuffield College, University of Oxford
Associate Member, Dept. of Statistics, University of Oxford
http://www.stats.ox.ac.uk/~snijders/
From: rsiena-help-bounces at lists.r-forge.r-project.org<mailto:rsiena-help-bounces at lists.r-forge.r-project.org> [mailto:rsiena-help-bounces at lists.r-forge.r-project.org<mailto:rsiena-help-bounces at lists.r-forge.r-project.org>] On Behalf Of marco tonellato
Sent: 25 February 2015 14:35
To: rsiena-help at lists.r-forge.r-project.org<mailto:rsiena-help at lists.r-forge.r-project.org>
Subject: [Rsiena-help] Error in Print01Report for multigroup analysis
Dear All,
while importing data in Rsiena (revision 278) for a test multigroup meta-analysis (7 groups, network size between 14 and 39, 1 dependent network and 1 constant dyadic covariate) I encountered the following error during the Print01Report routine.
Error in format(round(atts$meanp[j], 3), nsmall = 3, width = 10) :
error in evaluating the argument 'x' in selecting a method for function 'format': Error in round(atts$meanp[j], 3) :
non-numeric argument to mathematical function
Here is the code I used:
groups <- list()
groups[[1]] <- list(advice=array(c(g1t1_advice_adjacency, g1t2_advice_adjacency), dim=c(dim(g1t1_advice_adjacency),2)), energy=g1t1_energy_adjacency)
groups[[2]] <- list(advice=array(c(g2t1_advice_adjacency, g2t2_advice_adjacency), dim=c(dim(g2t1_advice_adjacency),2)), energy=g2t1_energy_adjacency)
groups[[3]] <- list(advice=array(c(g3t1_advice_adjacency, g3t2_advice_adjacency), dim=c(dim(g3t1_advice_adjacency),2)), energy=g3t1_energy_adjacency)
groups[[4]] <- list(advice=array(c(g4t1_advice_adjacency, g4t2_advice_adjacency), dim=c(dim(g4t1_advice_adjacency),2)), energy=g4t1_energy_adjacency)
groups[[5]] <- list(advice=array(c(g5t1_advice_adjacency, g5t2_advice_adjacency), dim=c(dim(g5t1_advice_adjacency),2)), energy=g5t1_energy_adjacency)
groups[[6]] <- list(advice=array(c(g6t1_advice_adjacency, g6t2_advice_adjacency), dim=c(dim(g6t1_advice_adjacency),2)), energy=g6t1_energy_adjacency)
groups[[7]] <- list(advice=array(c(g7t1_advice_adjacency, g7t2_advice_adjacency), dim=c(dim(g7t1_advice_adjacency),2)), energy=g7t1_energy_adjacency)
advicelist <- list()
for (i in 1:7){advicelist[[i]] <- sienaDependent(groups[[i]]$advice)}
energylist <- list()
for (i in 1:7){energylist[[i]] <- coDyadCovar(groups[[i]]$energy)}
groups_data_list <- list()
for (i in 1:7){groups_data_list[[i]] <- sienaDataCreate(advice = advicelist[[i]], energy = energylist[[i]])}
groups_data <- sienaGroupCreate(groups_data_list)
summary(groups_data)
groups_effects <- getEffects(groups_data)
print01Report(groups_data, modelname = 'groups_descriptives')
Do you have any clues on how to fix this?
Thank you.
Marco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rsiena-help/attachments/20150226/31f1c545/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sienaDataCreate.r
Type: application/octet-stream
Size: 67489 bytes
Desc: sienaDataCreate.r
URL: <http://lists.r-forge.r-project.org/pipermail/rsiena-help/attachments/20150226/31f1c545/attachment-0001.obj>
More information about the Rsiena-help
mailing list