spss

information from `label attribute` in R to `VARIABLE LABELS` in SPSS

久未见 提交于 2019-12-17 18:26:06
问题 I'm working in R, but I need to deliver some data in SPSS format with both 'variable labels' and 'value labels' and I'm kinda stuck. I've added variable labels to my data using the Hmisc 's label function. This add the variable labels as a label attribute , which is handy when using describe() from the Hmisc package. The problem is that I cannot get the write.foreign() function, from the foreign package, to recognize these labels as variable labels. I imagine I need to modify write.foreign()

Is there a Python module to open SPSS files?

主宰稳场 提交于 2019-12-17 15:39:40
问题 Is there a module for Python to open IBM SPSS (i.e. .sav) files? It would be great if there's something up-to-date which doesn't require any additional dll files/libraries. 回答1: I have released a python package "pyreadstat" that reads SPSS (sav, zsav and por), Stata and SAS files. It is a wrapper around the C library ReadStat so it is very fast. Readstat is the library used in the back of the R library Haven, which is widely used and very robust. The package is autocontained. It does not

Specifying relative paths in SPSS 18

≡放荡痞女 提交于 2019-12-14 03:52:47
问题 In SPSS 11 it was possible to specify relative paths. Example: FILE HANDLE myfile='..\..\data\current.txt' /LRECL=533. DATA LIST FILE=myfile / ... This worked because apparently, SPSS 11 set the working folder to the path where the source .SPS file is saved. It seems that SPSS 18 always sets it's working folder to the installation folder of SPSS itself. Which is not at all the same thing. Is there an option to change this behaviour? Or am I stuck with changing everything to absolute filenames

print result to cell SPSS python script

廉价感情. 提交于 2019-12-13 04:31:05
问题 I just want to only print my reslut to Spss cell called "vysledek", in python script. Ivot only two arrays, so i comper this arrays and count only in how many cases is the second one bigger than firts one, and wants to print the reslut to vysledek. Begin program. import spss, spssaux spssaux.OpenDataFile('C:\Users\šoťa\Desktop\datacssd.sav') dlist = ['PARLAMENTCSSD2010'] ilist = ['KRAJCSSD2012'] vlist = ['VYSLEDKY'] ddim = Len(dlist) idim = Len(ilist) For i In range(ddim): If dlist[x] < ilist

How can i add id and password (unique link) to survey link created with ibm spss data collection professional/author?

删除回忆录丶 提交于 2019-12-13 03:48:06
问题 I created a survey with ibm spss data collection professional/author. Survey link is like : http://survey.xxxyyy.com/mrIWeb/index.htm?I.Project=TestSurvey I would like to add id and password to survey link for personalization. I mean new link should be like: http://survey.xxxyyy.com/mrIWeb/index.htm?I.Project=TestSurvey&Id=xxxxxxxxx&PWD=xxxxxxxxx How can i do that? Thanks in advance for all your help. 回答1: It may be a little late for this answer, but this is quite easy to do. During Project

Keeping original variable order with 'select variables' command

允我心安 提交于 2019-12-13 01:28:20
问题 The following code was used to generate a list of numeric variables and their maxima and minima from a datafile containing >500 variables and >2000 cases: OMS select tables /if commands=["descriptives"] subtypes=["descriptive statistics"] /DESTINATION FORMAT = SAV OUTFILE = "C:\statyMcStatFace.sav". SPSSINC SELECT VARIABLES MACRONAME="!nums" /PROPERTIES TYPE= NUMERIC. DESCRIPTIVES !nums /STATISTICS=MIN MAX. omsend. Sadly, the variables weren't listed in the same order in the output file as

Remove variable labels attached with foreign/Hmisc SPSS import functions

橙三吉。 提交于 2019-12-12 07:52:28
问题 As usual, I got some SPSS file that I've imported into R with spss.get function from Hmisc package. I'm bothered with labelled class that Hmisc::spss.get adds to all variables in data.frame , hence want to remove it. labelled class gives me headaches when I try to run ggplot or even when I want to do some menial analysis! One solution would be to remove labelled class from each variable in data.frame . How can I do that? Is that possible at all? If not, what are my other options? I really

Aggregate Data/ Create a New Variable in SPSS

牧云@^-^@ 提交于 2019-12-11 19:38:45
问题 I have looked at the aggregate data questions on this forum and elsewhere - but I don't quite see an answer that helps me but that may be non-understanding on my behalf.I apologize. I have a huge amount of raw data test findings and I want to aggregate certain scores into one mean score. I can do this by creating a new variable in compute > transform but I cannot do this for 330+ by adding it 1 + 2 + 3 all by hand. My question is: How can I aggregate hundreds of scores and calculate a new

How to create a pie chart with color and pattern in SPSS

与世无争的帅哥 提交于 2019-12-11 18:29:04
问题 I want to create a colored and additional pattern, pie chart with GGRAPH\GPL. The function of the pattern is to visualize the major category to which the respective category belongs to. With the SPSS Chart Builder I can only create a colored or a patterned pie chart. The relevant ELEMENT Statement looks as follows: ELEMENT: interval.stack(position(summary.percent(COUNT))), color(myvar)) Or: ELEMENT: interval.stack(position(summary.percent(COUNT))), texture.pattern(myvar)) 回答1: Taking the

How to schedule SPSS Modeler streams to run automatically?

喜夏-厌秋 提交于 2019-12-11 14:22:29
问题 I'm very new to SPSS Modeler and previously used SAS Guide & Miner to schedule batches and scheduled runs. We currently manually run streams weekly then export them into Excel to use for reporting. Is there any way to schedule these streams to run automatically? Thank you. 回答1: ModelerBatch can be used only if you have the SPSS Modeler Server installed. I use the task scheduler from Windows but first you have to write an archive .bat Example of .bat: call "C:\Program Files\IBM\SPSS\Modeler\18