English 中文(简体)
linking info of pairs of respondents (couples) in SPSS
原标题:

I am preparing for analyses of the determinants of partner choice in SPSS, but basically I can t get off the ground because I don t know how to create new variables based on the information of each respondent s spouse (i.e. education, wages, social background, ethnicity etc.).

Each respondent is currently identified by an ID#, and exist two places in the matrix: as unit/respondent and as a spouse (either wife or husband), instantiated in a different column. What I need is to use info from each row of variables pertaining to an individual as respondent - to create new variables in the row of each person s spouse.

If it helps, I also have a separate file with all couples linked row-wise, as variables of the same unit - evidently with the same ID# as in my "variables-file" (yesterday, however, I merged these files - hopefully correctly...).

问题回答

Assume you have a variables called age, weight, id and spouse_id in a file called main.sav

  1. Make a copy of main.sav and call it spouse.sav
  2. Relabel all the content variables in spouse.sav: i.e., make age spouse_age and weigh spouse_weight
  3. Remove the variable id from spouse.sav
  4. Open main.sav and merge in spouse.sav on the common ID spouse_id. I.e., data - merge files - add variables




相关问题
How to manage a pageview DB

I am interested in tracking my users pageviews on my site. Being that traffic is expanding very quickly, I am worried about robots, etc, and I also want to be able to use tracked data live to alter ...

Statistics Question

Suppose I conduct a survey of 10 people asking whether to rank a movie as 0 to 4 stars. Allowable answers are 0, 1, 2, 3, and 4. The mean is 2.0 stars. How do I calculate the certainty (or ...

Calculating variance with large numbers

I haven t really used variance calculation that much, and I don t know quite what to expect. Actually I m not too good with math at all. I have a an array of 1000000 random numeric values in the ...

R statistical package: wrapping GOFrame objects

I m trying to generate GOFrame objects to generate a gene ontology mapping in R for unsupported organisms (see http://www.bioconductor.org/packages/release/bioc/vignettes/GOstats/inst/doc/...

Generating correlated numbers

Here is a fun one: I need to generate random x/y pairs that are correlated at a given value of Pearson product moment correlation coefficient, or Pearson r. You can imagine this as two arrays, array ...

Multivariate time series modelling in R

I want do fit some sort of multi-variate time series model using R. Here is a sample of my data: u cci bci cpi gdp dum1 dum2 dum3 dx 16.50 14.00 53.00 45.70 80....

热门标签