spss

Variable labels in SPSS Macro

折月煮酒 提交于 2019-12-24 16:56:07
问题 I'm new to the SPSS macro syntax and had a hard time trying to label variables based on a simple loop counter. Here's what I tried to do: define !make_indicatorvars() !do !i = 1 !to 10. !let !indicvar = !concat('indexvar_value_', !i, '_ind') compute !indicvar = 0. if(indexvar = !i) !indicvar = 1. variable labels !indicvar 'Indexvar has value ' + !quote(!i). value labels !indicvar 0 "No" 1 "Yes". !doend !enddefine. However, when I run this, I get the following warnings: Warning # 207 on line .

Variable labels in SPSS Macro

喜你入骨 提交于 2019-12-24 16:55:10
问题 I'm new to the SPSS macro syntax and had a hard time trying to label variables based on a simple loop counter. Here's what I tried to do: define !make_indicatorvars() !do !i = 1 !to 10. !let !indicvar = !concat('indexvar_value_', !i, '_ind') compute !indicvar = 0. if(indexvar = !i) !indicvar = 1. variable labels !indicvar 'Indexvar has value ' + !quote(!i). value labels !indicvar 0 "No" 1 "Yes". !doend !enddefine. However, when I run this, I get the following warnings: Warning # 207 on line .

Change rows to columns based on key ID's

允我心安 提交于 2019-12-24 07:58:26
问题 So here's an example of what I have, and an explanation of what I am looking for. I can't seem to get the restructure function in SPSS to work properly, could be the wrong tool for the job. Any help would be appreciated. Thank you! ID | Car_Make | Car_Model 999, Subaru, WRX 867, Volvo, 240 999,Acura, TSX ID | Car_Make1 | Car_Model1 | Car_Make2 | Car_Model2.....(Dependent on list) 999, Subaru, WRX, Acura, TSX 867, Volvo, 240 Any thoughts? Thank you! 回答1: What you are missing is a key\index

Change rows to columns based on key ID's

痞子三分冷 提交于 2019-12-24 07:57:21
问题 So here's an example of what I have, and an explanation of what I am looking for. I can't seem to get the restructure function in SPSS to work properly, could be the wrong tool for the job. Any help would be appreciated. Thank you! ID | Car_Make | Car_Model 999, Subaru, WRX 867, Volvo, 240 999,Acura, TSX ID | Car_Make1 | Car_Model1 | Car_Make2 | Car_Model2.....(Dependent on list) 999, Subaru, WRX, Acura, TSX 867, Volvo, 240 Any thoughts? Thank you! 回答1: What you are missing is a key\index

Number crunching in Ruby (optimisation needed)

半世苍凉 提交于 2019-12-24 03:02:52
问题 Ruby may not be the optimal language for this but I'm sort of comfortable working with this in my terminal so that's what I'm going with. I need to process the numbers from 1 to 666666 so I pin out all the numbers that contain 6 but doesn't contain 7, 8 or 9. The first number will be 6 , the next 16 , then 26 and so forth. Then I needed it printed like this (6=6) (16=6) (26=6) and when I have ranges like 60 to 66 I need it printed like (60 THRU 66=6) (SPSS syntax). I have this code and it

Compute sum of all cases

痴心易碎 提交于 2019-12-24 02:23:54
问题 browser pageviews month totalhits percentage ------------------------------------------------- ch 227025 Nov 2012 626760 36.22 ie 184232 Nov 2012 626760 29.39 s 81430 Nov 2012 626760 12.99 ff 72140 Nov 2012 626760 11.51 ie 39856 Nov 2012 626760 06.36 o 1010 Nov 2012 626760 00.16 rm 325 Nov 2012 626760 00.05 ot 20742 Nov 2012 626760 03.31 I have the above dataset. I want to calculate the percentage based on total hits. However, I want to calculate total hits based on the sum of pageviews. How

Export data into SPSS file (*.sav)

假装没事ソ 提交于 2019-12-22 17:58:10
问题 Is there any solution to export data into SPSS (*.sav) files? I have a web service with surveys, and result needed to be exported to different formats. I cant find any solution for SPSS. (in any language, free or non-free products - but need to execute on the server!) 回答1: I found a good library https://github.com/tiamo/spss. It was updated, and works as a charm 来源: https://stackoverflow.com/questions/43066035/export-data-into-spss-file-sav

SPSS: Comparing regression coefficient from multiple models

若如初见. 提交于 2019-12-22 12:31:41
问题 Assuming I have price of houses as the dependent variable and the following as the independent variable: Age Area Floor Time taken to walk to nearest railway station ( time_walk ) Time taken to commute, via train, from the nearest station to the CBD station ( time_train ) Is there a way to compare the coefficient of time_walk given different ranges of time_train . In essence what I would like to achieve is to investigate if people value walking differently, given a change in the mrt traveling

SPSS: Comparing regression coefficient from multiple models

£可爱£侵袭症+ 提交于 2019-12-22 12:30:42
问题 Assuming I have price of houses as the dependent variable and the following as the independent variable: Age Area Floor Time taken to walk to nearest railway station ( time_walk ) Time taken to commute, via train, from the nearest station to the CBD station ( time_train ) Is there a way to compare the coefficient of time_walk given different ranges of time_train . In essence what I would like to achieve is to investigate if people value walking differently, given a change in the mrt traveling

Is it possible to automatically repair corrupt Excel workbooks?

半腔热情 提交于 2019-12-22 05:16:28
问题 I am using SPSS 15 to create several Excel reports which I am then consolidating using an Excel macro. Unfortunately that particular SPSS version produces .xls files that aren't easily readable for Excel 2007 and up. Excel 2003 gobbles those files up just fine, but newer Excel versions display two error messages. First up is "Excel found unreadable content in filename.xls. Do you want to recover the contents of this workbook?". After clicking yes this is followed by "File Error: data may have