Re: [R] SPSS R Factor v2.4.2
Actually there is also a Windows binary: https://cran.r-project.org/bin/windows/contrib/3.2/polycor_0.7-8.zip hence installing with install.packages("polycor") should work *if* you choose a http (not https) mirror. The latter was not possible in R-3.2.0 which probably is what you are taking about. Best, Uwe Ligges On 06.08.2017 07:08, David Winsemius wrote: On Aug 5, 2017, at 7:02 PM, Gavin Brownwrote: I am not an R-Head, hence I use nice utilities that integrate R into SPSS I have SPSS v24, R3.20 and R3.40 I have run IBM SPSS R Integration which requires linking to R3.20 I have installed R Factor v2.4.2 This package requires 'polycor' library Unfortunately, 'polycor' does not exist in R3.20 That's not really correct. There is an archived version that should be compatible with your out-of-date version of R. See: ftp://cran.r-project.org/pub/R/src/contrib/Archive/polycor/ Good luck; David. DATASET ACTIVATE DataSet1. *M�rio Basto, Jos� Manuel Pereira, IPCA *Required: SPSS 21 and R Integration Plugin *R Packages required: psych, polycor, GPArotation, nFactors, corpcor, ICS, R.utils. set printback off. Error in library(polycor) : there is no package called 'polycor' This means the very good utility does not run in the way I have installed both R and SPSS Does anyone know what I've done wrong and how to overcome this? Prof. Gavin T L Brown, PhD Director Quantitative Data Analysis and Research Unit Faculty of Education & Social Work The University of Auckland Tel: +64 9 3737599 ext. 48602 Mob: +64 22 108 7253 Honorary Professor, Dept. of Curriculum & Instruction, Education University of Hong Kong Affiliated Professor, Dept. of Applied Educational Sciences, University of Umea, Sweden New: https://www.routledge.com/Assessment-of-Student-Achievement/Brown/p/book/9781138061866 [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] SPSS R Factor v2.4.2
> On Aug 5, 2017, at 7:02 PM, Gavin Brownwrote: > > I am not an R-Head, hence I use nice utilities that integrate R into SPSS > I have SPSS v24, R3.20 and R3.40 > I have run IBM SPSS R Integration which requires linking to R3.20 > I have installed R Factor v2.4.2 > This package requires 'polycor' library > Unfortunately, 'polycor' does not exist in R3.20 That's not really correct. There is an archived version that should be compatible with your out-of-date version of R. See: ftp://cran.r-project.org/pub/R/src/contrib/Archive/polycor/ Good luck; David. > > DATASET ACTIVATE DataSet1. > *M�rio Basto, Jos� Manuel Pereira, IPCA > *Required: SPSS 21 and R Integration Plugin > *R Packages required: psych, polycor, GPArotation, nFactors, corpcor, ICS, > R.utils. > set printback off. > Error in library(polycor) : there is no package called 'polycor' > > This means the very good utility does not run in the way I have installed > both R and SPSS > Does anyone know what I've done wrong and how to overcome this? > > Prof. Gavin T L Brown, PhD > Director Quantitative Data Analysis and Research Unit > Faculty of Education & Social Work > The University of Auckland > Tel: +64 9 3737599 ext. 48602 > Mob: +64 22 108 7253 > Honorary Professor, Dept. of Curriculum & Instruction, Education University > of Hong Kong > Affiliated Professor, Dept. of Applied Educational Sciences, University of > Umea, Sweden > > New: > https://www.routledge.com/Assessment-of-Student-Achievement/Brown/p/book/9781138061866 > > > [[alternative HTML version deleted]] > > __ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] SPSS R Factor v2.4.2
Well, you could download and install it into R! https://cran.r-project.org/web/packages/polycor/index.html However, as this seems to be about how SPSS integrates R, maybe you should post on their support list for help. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Sat, Aug 5, 2017 at 7:02 PM, Gavin Brownwrote: > I am not an R-Head, hence I use nice utilities that integrate R into SPSS > I have SPSS v24, R3.20 and R3.40 > I have run IBM SPSS R Integration which requires linking to R3.20 > I have installed R Factor v2.4.2 > This package requires 'polycor' library > Unfortunately, 'polycor' does not exist in R3.20 > > DATASET ACTIVATE DataSet1. > *Mário Basto, José Manuel Pereira, IPCA > *Required: SPSS 21 and R Integration Plugin > *R Packages required: psych, polycor, GPArotation, nFactors, corpcor, ICS, > R.utils. > set printback off. > Error in library(polycor) : there is no package called 'polycor' > > This means the very good utility does not run in the way I have installed > both R and SPSS > Does anyone know what I've done wrong and how to overcome this? > > Prof. Gavin T L Brown, PhD > Director Quantitative Data Analysis and Research Unit > Faculty of Education & Social Work > The University of Auckland > Tel: +64 9 3737599 ext. 48602 > Mob: +64 22 108 7253 > Honorary Professor, Dept. of Curriculum & Instruction, Education University > of Hong Kong > Affiliated Professor, Dept. of Applied Educational Sciences, University of > Umea, Sweden > > New: > https://www.routledge.com/Assessment-of-Student-Achievement/Brown/p/book/9781138061866 > > > [[alternative HTML version deleted]] > > > __ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] SPSS R Factor v2.4.2
I am not an R-Head, hence I use nice utilities that integrate R into SPSS I have SPSS v24, R3.20 and R3.40 I have run IBM SPSS R Integration which requires linking to R3.20 I have installed R Factor v2.4.2 This package requires 'polycor' library Unfortunately, 'polycor' does not exist in R3.20 DATASET ACTIVATE DataSet1. *M�rio Basto, Jos� Manuel Pereira, IPCA *Required: SPSS 21 and R Integration Plugin *R Packages required: psych, polycor, GPArotation, nFactors, corpcor, ICS, R.utils. set printback off. Error in library(polycor) : there is no package called 'polycor' This means the very good utility does not run in the way I have installed both R and SPSS Does anyone know what I've done wrong and how to overcome this? Prof. Gavin T L Brown, PhD Director Quantitative Data Analysis and Research Unit Faculty of Education & Social Work The University of Auckland Tel: +64 9 3737599 ext. 48602 Mob: +64 22 108 7253 Honorary Professor, Dept. of Curriculum & Instruction, Education University of Hong Kong Affiliated Professor, Dept. of Applied Educational Sciences, University of Umea, Sweden New: https://www.routledge.com/Assessment-of-Student-Achievement/Brown/p/book/9781138061866 [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] SPSS R-Menu for Ordinal Factor Analysis
Dear all, I am trying to conduct an enhanced version of factor analysis with a SPSS interface that allows to use R. This approach has been suggested in the recent article: Basto, M. and J.M. Pereira An SPSS R-Menu for Ordinal Factor Analysis. Journal of Statistical Software 46, pp. 1-29. My variables are ordinal-type and the tool of Basto allows to run polychoric correlations in the SPSS environment with the R essentials ans Plugin. I used R 2.10 version for spss 20 (I only have access to spss 20). I loaded the required packages. When running the factor analysis in spss with the plugin I receive the error message posted below. Aparently, the tool of Basto runs only with spss 19. Since the packages and the plugin are installed I think it must be a problem of the spss version. Could someone suggest me a solution for the problem? I am not familiar with R, and so I would prefer to run the factor analysis in spss. Is there any possebility to run it with spss V. 20? Best regards and compliments for your work, Till Below (PhD student, Humboldt Universität zu Berlin, Germany) SPSS output with error message: GET FILE='C:\X. DATASET NAME DatenSet1 WINDOW=FRONT. DATASET ACTIVATE DatenSet1. SAVE OUTFILE='C:\XX /COMPRESSED. *Mário Basto, José Manuel Pereira, IPCA *Required: SPSS 19 and R Integration Plugin *R Packages required: psych, polycor, GPArotation, nFactors, corpcor, ICS. set printback off. -- Till Below (PhD Student) Humboldt-Universität zu Berlin __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] SPSS R-Menu for Ordinal Factor Analysis
On 26/03/2012 7:32 AM, Till Below wrote: Dear all, I am trying to conduct an enhanced version of factor analysis with a SPSS interface that allows to use R. This approach has been suggested in the recent article: Basto, M. and J.M. Pereira An SPSS R-Menu for Ordinal Factor Analysis. Journal of Statistical Software 46, pp. 1-29. My variables are ordinal-type and the tool of Basto allows to run polychoric correlations in the SPSS environment with the R essentials ans Plugin. I used R 2.10 version for spss 20 (I only have access to spss 20). I loaded the required packages. When running the factor analysis in spss with the plugin I receive the error message posted below. Aparently, the tool of Basto runs only with spss 19. Since the packages and the plugin are installed I think it must be a problem of the spss version. Could someone suggest me a solution for the problem? I am not familiar with R, and so I would prefer to run the factor analysis in spss. Is there any possebility to run it with spss V. 20? I think you will need to ask this question in an SPSS help forum: - Version 2.10.x of R is quite old, and is no longer supported. - The error message is coming from SPSS, not R Duncan Murdoch Best regards and compliments for your work, Till Below (PhD student, Humboldt Universität zu Berlin, Germany) SPSS output with error message: GET FILE='C:\X. DATASET NAME DatenSet1 WINDOW=FRONT. DATASET ACTIVATE DatenSet1. SAVE OUTFILE='C:\XX /COMPRESSED. *Mário Basto, José Manuel Pereira, IPCA *Required: SPSS 19 and R Integration Plugin *R Packages required: psych, polycor, GPArotation, nFactors, corpcor, ICS. set printback off. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] SPSS R-Menu for Ordinal Factor Analysis
On Mar 26, 2012, at 16:31 , Duncan Murdoch wrote: I think you will need to ask this question in an SPSS help forum: - Version 2.10.x of R is quite old, and is no longer supported. - The error message is coming from SPSS, not R and actually, it doesn't look like an error message at all, rather like a piece of an SPSS syntax file. -- Peter Dalgaard, Professor Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd@cbs.dk Priv: pda...@gmail.com __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] SPSS R-Menu for Ordinal Factor Analysis
Hi Till, you need a plug-in for SPSS to run R, which is bound to a fixed R version. SPSS 19 uses R2.10 and SPSS 20 uses R2.12 (both not up-to-date R versions). So you have to download this plugin (after registering on IBM Support) for your spss version and the according R version - or start with a brand new R2.14 ;) Cheers. Am 26.03.2012 13:32, schrieb Till Below: Dear all, I am trying to conduct an enhanced version of factor analysis with a SPSS interface that allows to use R. This approach has been suggested in the recent article: Basto, M. and J.M. Pereira An SPSS R-Menu for Ordinal Factor Analysis. Journal of Statistical Software 46, pp. 1-29. My variables are ordinal-type and the tool of Basto allows to run polychoric correlations in the SPSS environment with the R essentials ans Plugin. I used R 2.10 version for spss 20 (I only have access to spss 20). I loaded the required packages. When running the factor analysis in spss with the plugin I receive the error message posted below. Aparently, the tool of Basto runs only with spss 19. Since the packages and the plugin are installed I think it must be a problem of the spss version. Could someone suggest me a solution for the problem? I am not familiar with R, and so I would prefer to run the factor analysis in spss. Is there any possebility to run it with spss V. 20? Best regards and compliments for your work, Till Below (PhD student, Humboldt Universität zu Berlin, Germany) SPSS output with error message: GET FILE='C:\X. DATASET NAME DatenSet1 WINDOW=FRONT. DATASET ACTIVATE DatenSet1. SAVE OUTFILE='C:\XX /COMPRESSED. *Mário Basto, José Manuel Pereira, IPCA *Required: SPSS 19 and R Integration Plugin *R Packages required: psych, polycor, GPArotation, nFactors, corpcor, ICS. set printback off. -- Eik Vettorazzi Department of Medical Biometry and Epidemiology University Medical Center Hamburg-Eppendorf Martinistr. 52 20246 Hamburg T ++49/40/7410-58243 F ++49/40/7410-57790 -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des Vorsitzenden), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] SPSS - R
Dear Kristi, Also. can anyone recommend any resources to help SPSS users learn to things in R? You may want to have a look at the R2STATS package, a simple GUI for linear models. Best, Yvonnick Noel University of Brittany Department of Psychology Rennes, France __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] SPSS - R
At 16:41 27/11/2011, Kristi Shoemaker wrote: Hi John, Your assumptions are correct and those examples were very helpful, thanks! I think I'm almost there, but I'm screwing up something with the within-subjects factor (the example has two, I only have one). See below. Why am I not seeing my within-subjects factors in the ANOVA report? I am by no means an expert in this but my reading of the documentation suggests that the idata and idesign parameters are for multivariate models and that is not what you specified. Dat2 Subj Age Sex Time HippV 1 s01 32.9 1 0w 6.50098 2 s01 32.9 1 6w 6.91793 3 s02 35.1 0 0w 7.32480 4 s02 35.1 0 6w 7.56012 5 s03 34.4 0 0w 6.51385 6 s03 34.4 0 6w 6.56875 9 s05 39.9 1 0w 6.92855 10 s05 39.9 1 6w 6.94926 11 s06 29.5 1 0w 6.99383 12 s06 29.5 1 6w 7.10568 13 s07 45.9 1 0w 6.94380 14 s07 45.9 1 6w 7.08190 15 s08 20.3 1 0w 7.76881 16 s08 20.3 1 6w 7.72725 17 s09 26.9 0 0w 5.37566 18 s09 26.9 0 6w 5.74887 21 s11 22.0 0 0w 7.12992 22 s11 22.0 0 6w 7.16237 23 s12 31.0 1 0w 6.70629 24 s12 31.0 1 6w 6.80872 25 s13 50.1 1 0w 7.22649 26 s13 50.1 1 6w 7.58900 27 s14 22.2 0 0w 5.97577 28 s14 22.2 0 6w 5.80801 29 s16 20.4 1 0w 7.99554 30 s16 20.4 1 6w 8.09260 31 s20 24.0 0 0w 7.01014 32 s20 24.0 0 6w 6.87821 33 s21 32.4 0 0w 5.90883 34 s21 32.4 0 6w 5.95392 37 s24 22.2 0 0w 6.15474 38 s24 22.2 0 6w 6.00906 41 s27 22.2 1 0w 7.88765 42 s27 22.2 1 6w 7.76038 49 s35 24.3 0 0w 6.05998 50 s35 24.3 0 6w 6.07399 51 s36 23.5 0 0w 7.83182 52 s36 23.5 0 6w 7.60268 53 s38 59.7 1 0w 7.39672 54 s38 59.7 1 6w 6.98291 55 s39 40.5 0 0w 7.31330 56 s39 40.5 0 6w 7.50559 57 s40 24.2 1 0w 8.54958 58 s40 24.2 1 6w 8.65016 59 s41 23.6 1 0w 7.76049 60 s41 23.6 1 6w 7.58946 61 s42 53.3 0 0w 7.03388 62 s42 53.3 0 6w 7.48384 63 s43 34.4 0 0w 6.86967 64 s43 34.4 0 6w 6.81076 65 s44 44.8 0 0w 7.33779 66 s44 44.8 0 6w 7.86175 67 s45 40.2 1 0w 6.55963 68 s45 40.2 1 6w 6.52577 71 s47 26.5 0 0w 7.09418 72 s47 26.5 0 6w 6.92850 73 s48 22.7 0 0w 6.77078 74 s48 22.7 0 6w 6.67289 75 s50 36.1 1 0w 7.47208 76 s50 36.1 1 6w 7.55876 library(car) Loading required package: MASS Loading required package: nnet Loading required package: survival Loading required package: splines timepoints - factor(c(0w, 6w), + levels=c(0w,6w)) idata=data.frame(timepoints) mod.ok - lm(HippV ~ Age*Sex,data=Dat2) (av.ok - Anova(mod.ok, idata=idata, idesign=~timepoints)) Anova Table (Type II tests) Response: HippV Sum Sq Df F valuePr(F) Age0.0234 1 0.071 0.7909202 Sex5.3082 1 16.128 0.0001781 *** Age:Sex4.7772 1 14.514 0.0003478 *** Residuals 18.4314 56 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 From: John Fox j...@mcmaster.ca Cc: r-help@r-project.org Sent: Saturday, November 26, 2011 7:19 PM Subject: RE: [R] SPSS - R Dear Kristi, I assume that this is a repeated-measures ANOVA with one within-subjects factor (Time) and two between-subjects factors (Age and Sex, which are crossed). If Age is numeric, and not a factor, then the type-III tests that you requested don't test sensible hypotheses. In any event, if my guess is right about the design, then you can use the Anova() function in the car package for an equivalent analysis. See the repeated-measures example in ?Anova (for the O'Brien and Kaiser data). You've already had an answer to the more general question. I hope this helps, John John Fox Senator William McMaster Professor of Social Statistics Department of Sociology McMaster University Hamilton, Ontario, Canada http://socserv.mcmaster.ca/jfox -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Kristi Shoemaker Sent: November-26-11 11:08 AM To: r-help@r-project.org Subject: [R] SPSS - R I'm an SPSS user trying to make the transition to R. Can someone help me translate the following SPSS code into R?: GLM Total_tp1 Total_tp2 WITH Age Sex /WSFACTOR=Time 2 Repeated /METHOD=SSTYPE(3) /CRITERIA=ALPHA(.05) /WSDESIGN= Time /DESIGN= Age Sex Age*Sex. Also. can anyone recommend any resources to help SPSS users learn to things in R? Thanks, -kristi [[alternative HTML version deleted]] [[alternative HTML version deleted]] Michael Dewey i...@aghmed.fsnet.co.uk http://www.aghmed.fsnet.co.uk/home.html __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] SPSS - R
Dear Michael, The original poster and I ended up pursuing this question off-list and, I think, resolving the issue, discovering in the process that SPSS apparently reports type-II tests that are really type-III tests. (Yes, one fits a multivariate linear model prior to calling Anova() with the idata and idesign arguments.) Best, John John Fox Senator William McMaster Professor of Social Statistics Department of Sociology McMaster University Hamilton, Ontario, Canada http://socserv.mcmaster.ca/jfox -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Michael Dewey Sent: November-30-11 6:49 AM To: Kristi Shoemaker; r-help@r-project.org Subject: Re: [R] SPSS - R At 16:41 27/11/2011, Kristi Shoemaker wrote: Hi John, Your assumptions are correct and those examples were very helpful, thanks! I think I'm almost there, but I'm screwing up something with the within-subjects factor (the example has two, I only have one). See below. Why am I not seeing my within-subjects factors in the ANOVA report? I am by no means an expert in this but my reading of the documentation suggests that the idata and idesign parameters are for multivariate models and that is not what you specified. Dat2 Subj Age Sex Time HippV 1 s01 32.9 1 0w 6.50098 2 s01 32.9 1 6w 6.91793 3 s02 35.1 0 0w 7.32480 4 s02 35.1 0 6w 7.56012 5 s03 34.4 0 0w 6.51385 6 s03 34.4 0 6w 6.56875 9 s05 39.9 1 0w 6.92855 10 s05 39.9 1 6w 6.94926 11 s06 29.5 1 0w 6.99383 12 s06 29.5 1 6w 7.10568 13 s07 45.9 1 0w 6.94380 14 s07 45.9 1 6w 7.08190 15 s08 20.3 1 0w 7.76881 16 s08 20.3 1 6w 7.72725 17 s09 26.9 0 0w 5.37566 18 s09 26.9 0 6w 5.74887 21 s11 22.0 0 0w 7.12992 22 s11 22.0 0 6w 7.16237 23 s12 31.0 1 0w 6.70629 24 s12 31.0 1 6w 6.80872 25 s13 50.1 1 0w 7.22649 26 s13 50.1 1 6w 7.58900 27 s14 22.2 0 0w 5.97577 28 s14 22.2 0 6w 5.80801 29 s16 20.4 1 0w 7.99554 30 s16 20.4 1 6w 8.09260 31 s20 24.0 0 0w 7.01014 32 s20 24.0 0 6w 6.87821 33 s21 32.4 0 0w 5.90883 34 s21 32.4 0 6w 5.95392 37 s24 22.2 0 0w 6.15474 38 s24 22.2 0 6w 6.00906 41 s27 22.2 1 0w 7.88765 42 s27 22.2 1 6w 7.76038 49 s35 24.3 0 0w 6.05998 50 s35 24.3 0 6w 6.07399 51 s36 23.5 0 0w 7.83182 52 s36 23.5 0 6w 7.60268 53 s38 59.7 1 0w 7.39672 54 s38 59.7 1 6w 6.98291 55 s39 40.5 0 0w 7.31330 56 s39 40.5 0 6w 7.50559 57 s40 24.2 1 0w 8.54958 58 s40 24.2 1 6w 8.65016 59 s41 23.6 1 0w 7.76049 60 s41 23.6 1 6w 7.58946 61 s42 53.3 0 0w 7.03388 62 s42 53.3 0 6w 7.48384 63 s43 34.4 0 0w 6.86967 64 s43 34.4 0 6w 6.81076 65 s44 44.8 0 0w 7.33779 66 s44 44.8 0 6w 7.86175 67 s45 40.2 1 0w 6.55963 68 s45 40.2 1 6w 6.52577 71 s47 26.5 0 0w 7.09418 72 s47 26.5 0 6w 6.92850 73 s48 22.7 0 0w 6.77078 74 s48 22.7 0 6w 6.67289 75 s50 36.1 1 0w 7.47208 76 s50 36.1 1 6w 7.55876 library(car) Loading required package: MASS Loading required package: nnet Loading required package: survival Loading required package: splines timepoints - factor(c(0w, 6w), + levels=c(0w,6w)) idata=data.frame(timepoints) mod.ok - lm(HippV ~ Age*Sex,data=Dat2) (av.ok - Anova(mod.ok, idata=idata, idesign=~timepoints)) Anova Table (Type II tests) Response: HippV Sum Sq Df F valuePr(F) Age0.0234 1 0.071 0.7909202 Sex5.3082 1 16.128 0.0001781 *** Age:Sex4.7772 1 14.514 0.0003478 *** Residuals 18.4314 56 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 From: John Fox j...@mcmaster.ca Cc: r-help@r-project.org Sent: Saturday, November 26, 2011 7:19 PM Subject: RE: [R] SPSS - R Dear Kristi, I assume that this is a repeated-measures ANOVA with one within-subjects factor (Time) and two between-subjects factors (Age and Sex, which are crossed). If Age is numeric, and not a factor, then the type-III tests that you requested don't test sensible hypotheses. In any event, if my guess is right about the design, then you can use the Anova() function in the car package for an equivalent analysis. See the repeated-measures example in ?Anova (for the O'Brien and Kaiser data). You've already had an answer to the more general question. I hope this helps, John John Fox Senator William McMaster Professor of Social Statistics Department of Sociology McMaster University Hamilton, Ontario, Canada http://socserv.mcmaster.ca/jfox -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org
Re: [R] SPSS - R
Hi John, Your assumptions are correct and those examples were very helpful, thanks! I think I'm almost there, but I'm screwing up something with the within-subjects factor (the example has two, I only have one). See below. Why am I not seeing my within-subjects factors in the ANOVA report? Dat2 Subj Age Sex Time HippV 1 s01 32.9 1 0w 6.50098 2 s01 32.9 1 6w 6.91793 3 s02 35.1 0 0w 7.32480 4 s02 35.1 0 6w 7.56012 5 s03 34.4 0 0w 6.51385 6 s03 34.4 0 6w 6.56875 9 s05 39.9 1 0w 6.92855 10 s05 39.9 1 6w 6.94926 11 s06 29.5 1 0w 6.99383 12 s06 29.5 1 6w 7.10568 13 s07 45.9 1 0w 6.94380 14 s07 45.9 1 6w 7.08190 15 s08 20.3 1 0w 7.76881 16 s08 20.3 1 6w 7.72725 17 s09 26.9 0 0w 5.37566 18 s09 26.9 0 6w 5.74887 21 s11 22.0 0 0w 7.12992 22 s11 22.0 0 6w 7.16237 23 s12 31.0 1 0w 6.70629 24 s12 31.0 1 6w 6.80872 25 s13 50.1 1 0w 7.22649 26 s13 50.1 1 6w 7.58900 27 s14 22.2 0 0w 5.97577 28 s14 22.2 0 6w 5.80801 29 s16 20.4 1 0w 7.99554 30 s16 20.4 1 6w 8.09260 31 s20 24.0 0 0w 7.01014 32 s20 24.0 0 6w 6.87821 33 s21 32.4 0 0w 5.90883 34 s21 32.4 0 6w 5.95392 37 s24 22.2 0 0w 6.15474 38 s24 22.2 0 6w 6.00906 41 s27 22.2 1 0w 7.88765 42 s27 22.2 1 6w 7.76038 49 s35 24.3 0 0w 6.05998 50 s35 24.3 0 6w 6.07399 51 s36 23.5 0 0w 7.83182 52 s36 23.5 0 6w 7.60268 53 s38 59.7 1 0w 7.39672 54 s38 59.7 1 6w 6.98291 55 s39 40.5 0 0w 7.31330 56 s39 40.5 0 6w 7.50559 57 s40 24.2 1 0w 8.54958 58 s40 24.2 1 6w 8.65016 59 s41 23.6 1 0w 7.76049 60 s41 23.6 1 6w 7.58946 61 s42 53.3 0 0w 7.03388 62 s42 53.3 0 6w 7.48384 63 s43 34.4 0 0w 6.86967 64 s43 34.4 0 6w 6.81076 65 s44 44.8 0 0w 7.33779 66 s44 44.8 0 6w 7.86175 67 s45 40.2 1 0w 6.55963 68 s45 40.2 1 6w 6.52577 71 s47 26.5 0 0w 7.09418 72 s47 26.5 0 6w 6.92850 73 s48 22.7 0 0w 6.77078 74 s48 22.7 0 6w 6.67289 75 s50 36.1 1 0w 7.47208 76 s50 36.1 1 6w 7.55876 library(car) Loading required package: MASS Loading required package: nnet Loading required package: survival Loading required package: splines timepoints - factor(c(0w, 6w), + levels=c(0w,6w)) idata=data.frame(timepoints) mod.ok - lm(HippV ~ Age*Sex,data=Dat2) (av.ok - Anova(mod.ok, idata=idata, idesign=~timepoints)) Anova Table (Type II tests) Response: HippV Sum Sq Df F value Pr(F) Age 0.0234 1 0.071 0.7909202 Sex 5.3082 1 16.128 0.0001781 *** Age:Sex 4.7772 1 14.514 0.0003478 *** Residuals 18.4314 56 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 From: John Fox j...@mcmaster.ca Cc: r-help@r-project.org Sent: Saturday, November 26, 2011 7:19 PM Subject: RE: [R] SPSS - R Dear Kristi, I assume that this is a repeated-measures ANOVA with one within-subjects factor (Time) and two between-subjects factors (Age and Sex, which are crossed). If Age is numeric, and not a factor, then the type-III tests that you requested don't test sensible hypotheses. In any event, if my guess is right about the design, then you can use the Anova() function in the car package for an equivalent analysis. See the repeated-measures example in ?Anova (for the O'Brien and Kaiser data). You've already had an answer to the more general question. I hope this helps, John John Fox Senator William McMaster Professor of Social Statistics Department of Sociology McMaster University Hamilton, Ontario, Canada http://socserv.mcmaster.ca/jfox -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Kristi Shoemaker Sent: November-26-11 11:08 AM To: r-help@r-project.org Subject: [R] SPSS - R I'm an SPSS user trying to make the transition to R. Can someone help me translate the following SPSS code into R?: GLM Total_tp1 Total_tp2 WITH Age Sex /WSFACTOR=Time 2 Repeated /METHOD=SSTYPE(3) /CRITERIA=ALPHA(.05) /WSDESIGN= Time /DESIGN= Age Sex Age*Sex. Also. can anyone recommend any resources to help SPSS users learn to things in R? Thanks, -kristi [[alternative HTML version deleted]] [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] SPSS - R
I'm an SPSS user trying to make the transition to R. Can someone help me translate the following SPSS code into R?: GLM Total_tp1 Total_tp2 WITH Age Sex /WSFACTOR=Time 2 Repeated /METHOD=SSTYPE(3) /CRITERIA=ALPHA(.05) /WSDESIGN= Time /DESIGN= Age Sex Age*Sex. Also. can anyone recommend any resources to help SPSS users learn to things in R? Thanks, -kristi [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] SPSS - R
If you know SPSS already why not learn R modeling syntax and do this yourself? If ALPHA(.05) implies that you are using stepwise variable selection note that this is an invalid statistical technique. Frank Kristi Shoemaker wrote I'm an SPSS user trying to make the transition to R. Can someone help me translate the following SPSS code into R?: GLM Total_tp1 Total_tp2 WITH Age Sex /WSFACTOR=Time 2 Repeated /METHOD=SSTYPE(3) /CRITERIA=ALPHA(.05) /WSDESIGN= Time /DESIGN= Age Sex Age*Sex. Also. can anyone recommend any resources to help SPSS users learn to things in R? Thanks, -kristi [[alternative HTML version deleted]] __ R-help@ mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. - Frank Harrell Department of Biostatistics, Vanderbilt University -- View this message in context: http://r.789695.n4.nabble.com/SPSS-R-tp4110995p4111006.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] SPSS - R
Perhaps this website and the associated book will be of help: http://r4stats.com/ Michael On Nov 26, 2011, at 11:08 AM, Kristi Shoemaker kristi.shoema...@yahoo.com wrote: I'm an SPSS user trying to make the transition to R. Can someone help me translate the following SPSS code into R?: GLM Total_tp1 Total_tp2 WITH Age Sex � /WSFACTOR=Time 2 Repeated � /METHOD=SSTYPE(3) � /CRITERIA=ALPHA(.05) � /WSDESIGN= Time � /DESIGN= Age Sex Age*Sex. Also. can anyone recommend any resources to help SPSS users learn to things in R? Thanks, -kristi [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] SPSS - R
Dear Kristi, I assume that this is a repeated-measures ANOVA with one within-subjects factor (Time) and two between-subjects factors (Age and Sex, which are crossed). If Age is numeric, and not a factor, then the type-III tests that you requested don't test sensible hypotheses. In any event, if my guess is right about the design, then you can use the Anova() function in the car package for an equivalent analysis. See the repeated-measures example in ?Anova (for the O'Brien and Kaiser data). You've already had an answer to the more general question. I hope this helps, John John Fox Senator William McMaster Professor of Social Statistics Department of Sociology McMaster University Hamilton, Ontario, Canada http://socserv.mcmaster.ca/jfox -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Kristi Shoemaker Sent: November-26-11 11:08 AM To: r-help@r-project.org Subject: [R] SPSS - R I'm an SPSS user trying to make the transition to R. Can someone help me translate the following SPSS code into R?: GLM Total_tp1 Total_tp2 WITH Age Sex /WSFACTOR=Time 2 Repeated /METHOD=SSTYPE(3) /CRITERIA=ALPHA(.05) /WSDESIGN= Time /DESIGN= Age Sex Age*Sex. Also. can anyone recommend any resources to help SPSS users learn to things in R? Thanks, -kristi [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.