R – SPSS (equivalent commands)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

R – SPSS (equivalent commands)

drfg2008
What is the equivalent command in SPSS for he following  R-command?

btbb <- glm(ybb ~ xbb - 1, family = binomial, weights = c(rep(13, 21)))

(no intercept)

Here is the data (SPSS)

http://www.datest.de/frag_einen_statistiker/Bradley_Terry/Beispiel_Pietsch.sav

and here is the R syntax:

> ybb <- c(7,9,7,7,9,11,7,5,11,9,9,7,7,8,12,6,7,10,7,12,6)/13

> xbb <- matrix(c(1, -1, 0, 0, 0, 0, 0,
+ 1, 0, -1, 0, 0, 0, 0,
+ 1, 0, 0, -1, 0, 0, 0,
(…)
+ 1, 0, 0, 0, -1, 0, 0,
+ 1, 0, 0, 0, 0, -1, 0,
+ 1, 0, 0, 0, 0, 0, -1,
+ ...
+ 0, 0, 0, 0, 1, 0, -1,
+ 0, 0, 0, 0, 0, 1, -1), nrow=21, ncol=7, byrow=TRUE)

> btbb <- glm(ybb ~ xbb - 1, family = binomial, weights = c(rep(13, 21)))

> btbb
Call: glm(formula = ybb ~ xbb - 1, family = binomial, weights = c(rep(13, 21)))
Coefficients:
xbb1 xbb2 xbb3 xbb4 xbb5 xbb6 xbb7
1.5814 1.4364 1.2945 1.2476 1.1077 0.6839 NA
Degrees of Freedom: 21 Total (i.e. Null); 15 Residual
Null Deviance: 49.7
Residual Deviance: 15.74 AIC: 87.32

Dr. Frank Gaeth

Reply | Threaded
Open this post in threaded view
|

Re: R – SPSS (equivalent commands)

drfg2008
any idea wellcome

Dr. Frank Gaeth

Reply | Threaded
Open this post in threaded view
|

FW: R - SPSS (equivalent commands)

Anthony Babinec
Springer has a book authored by Robert Muenchen entitled
"R for SAS and SPSS Users." It's a great resource.

Robert Kabacoff has a very useful website called Quick-R.
The URL is  http://www.statmethods.net/. Take a look
at the home page or the sitemap.

Tony Babinec
[hidden email]

=====================
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