spsspivottable.Display command

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

spsspivottable.Display command

Kylie
Hi all,

Further to my previous email below, I have found the documentation for the
hetcor R command and so found out what was needed to generate the standard
error. I now need help modifying the spsspivottable.Display command to
include the extra parameter.

Here is the original command:

spsspivottable.Display(res$correlations, title="Correlation Matrix",
rowdim=" ", coldim="col", format=formatSpec.Correlation)

I'd like to now include both the res$correlations and res$std.errors in the
pivot table. Ie something like:
spsspivottable.Display(res$correlations, res$std.errors, title="Correlation
Matrix", rowdim= .....).

Any suggestions?

Thanks,
Kylie.


-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Kylie Lange
Sent: Wednesday, 9 September 2009 4:36 PM
To: [hidden email]
Subject: polychoric correlation R program

Hi all,

A colleague has been using the polychor R program for SPSS below to get
polychoric correlations of ordinal variables. She received the program at a
training course and I am not sure who the original author is. She would like
to get the standard error of the correlation printed out as well. Does
anyone know if this is possible?

They have already tried setting the std.err parameter in the 'hetor' command
to TRUE, but I think the corresponding res$ field may have to be added to
the spsspivottable.Display command? I have only basic knowledge of R and
none of the R/SPSS interface, so any suggestions would be appreciated.

BEGIN PROGRAM R.
library(polycor)
casedata <-spssdata.GetDataFromSPSS()
test1 <-as.factor(casedata$test1)
retest1 <-as.factor(casedata$retest1)
res <- hetcor(test1, retest1, ML = FALSE,std.err = FALSE,
bins=2)
spsspivottable.Display(res$correlations,
                            title="Correlation Matrix",
                            rowdim=" ",
                            coldim="col",
                            format=formatSpec.Correlation)
END PROGRAM.

Thanks,
Kylie.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD