Restructure data

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

Restructure data

mils
Hi,

I have the following data (see attached):

q11_1 q11_2 q11_3 q15a1 q15a2 q15b1 q15b2 q15c1 q15c2

Where q11  are usage level (1-7) of different treatments and q15 are attributes ratings for each drug (1-7).

I would like to restructure the data to get the following (see attached):

q11new q15a1 q15a2 q15b1 q15b2 q15c1 q15c2


Any help will be much appreciate it.

Mils

Restructure.xlsx 
mils
Reply | Threaded
Open this post in threaded view
|

Re: Restructure data

David Marso
Administrator
Mils,
  Please post PLAIN TEXT or SAV format rather than xlsx attachments
(NOT  EVERYONE has a newer version of Office, therefore you limit your audience).
Furthermore, DESCRIBE the problem rather than expecting anyone to use ESP to
figure out what you are trying to do.  I will ignore this question beyond posting this hint.  

mils wrote
Hi,

I have the following data (see attached):

q11_1 q11_2 q11_3 q15a1 q15a2 q15b1 q15b2 q15c1 q15c2

Where q11  are usage level (1-7) of different treatments and q15 are attributes ratings for each drug (1-7).

I would like to restructure the data to get the following (see attached):

q11new q15a1 q15a2 q15b1 q15b2 q15c1 q15c2


Any help will be much appreciate it.

Mils

Restructure.xlsx
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: Restructure data

mils
In reply to this post by mils
Hi David,

Sorry if I was a bit vague in my description, I guess I didn't know exactly how to explain it.

Q11 is Likelihood to initiate / prescribe a drug with a scale 1 to 7 where 1 is I have never used this biologic and 7 is I am currently treating patients with this biologic.

Q15 is please use a scale of 1-7, where 1= ‘does not describe at all’ and 7= ‘describes completely’ to indicate what you think of the performance of each of the following products (q11) on each attribute (there are 13) for the treatment of psoriasis

I would like to find the "Key drivers" that make physicians choose a drug when treating its patients with a biologic.

So, I thought of restructuring the data as shown below:


VARSTOCASES
  /ID=id
  /MAKE trans1 FROM q11_1 q11_2 q11_3 q11_4
  /INDEX=Index1(4)
  /KEEP=q15ar1 q15ar2 q15ar3 q15ar4 q15ar5 q15ar6 q15ar7 q15ar8 q15ar9 q15ar10 q15ar11 q15ar12
    q15ar13 q15br1 q15br2 q15br3 q15br4 q15br5 q15br6 q15br7 q15br8 q15br9 q15br10 q15br11 q15br12
    q15br13 q15cr1 q15cr2 q15cr3 q15cr4 q15cr5 q15cr6 q15cr7 q15cr8 q15cr9 q15cr10 q15cr11 q15cr12
    q15cr13 q15dr1 q15dr2 q15dr3 q15dr4 q15dr5 q15dr6 q15dr7 q15dr8 q15dr9 q15dr10 q15dr11 q15dr12
    q15dr13
  /NULL=KEEP.

Now I just need to run either a linear regression or a MANOVA? Suggestions

Thanks, I hope know if make more sense.

mils


Restructure.txt

mils
Reply | Threaded
Open this post in threaded view
|

Re: Restructure data

David Marso
Administrator
From the data you attached:  NOTE that the UGA portal does NOT accept attachments.
Any reason why you don't just copy/paste into the message?  
Please open a NEW topic for the MANOVA/Regression or whatever question and state your specific hypotheses.  Many people with stats expertise will likely IGNORE the data restructuring question.
I personally don't give free statistical consultation.
---
DATA LIST LIST
  /q11_1 q11_2 q11_3 q15a1 q15a2 q15b1 q15b2 q15c1 q15c2.
BEGIN DATA
3 0 1 5 4 4 6 4 5
2 2 3 6 5 3 4 6 3
4 7 4 7 6 2 3 1 4
6 6 5 6 7 7 1 3 2
END DATA.
VARSTOCASES ID=ID /MAKE q11 FROM q11_1 TO q11_3 / INDEX=IND(3).
SORT CASES BY IND ID.

mils wrote
Hi David,

Sorry if I was a bit vague in my description, I guess I didn't know exactly how to explain it.

Q11 is Likelihood to initiate / prescribe a drug with a scale 1 to 7 where 1 is I have never used this biologic and 7 is I am currently treating patients with this biologic.

Q15 is please use a scale of 1-7, where 1= ‘does not describe at all’ and 7= ‘describes completely’ to indicate what you think of the performance of each of the following products (q11) on each attribute (there are 13) for the treatment of psoriasis

I would like to find the "Key drivers" that make physicians choose a drug when treating its patients with a biologic.

So, I thought of restructuring the data as shown below:


VARSTOCASES
  /ID=id
  /MAKE trans1 FROM q11_1 q11_2 q11_3 q11_4
  /INDEX=Index1(4)
  /KEEP=q15ar1 q15ar2 q15ar3 q15ar4 q15ar5 q15ar6 q15ar7 q15ar8 q15ar9 q15ar10 q15ar11 q15ar12
    q15ar13 q15br1 q15br2 q15br3 q15br4 q15br5 q15br6 q15br7 q15br8 q15br9 q15br10 q15br11 q15br12
    q15br13 q15cr1 q15cr2 q15cr3 q15cr4 q15cr5 q15cr6 q15cr7 q15cr8 q15cr9 q15cr10 q15cr11 q15cr12
    q15cr13 q15dr1 q15dr2 q15dr3 q15dr4 q15dr5 q15dr6 q15dr7 q15dr8 q15dr9 q15dr10 q15dr11 q15dr12
    q15dr13
  /NULL=KEEP.

Now I just need to run either a linear regression or a MANOVA? Suggestions

Thanks, I hope know if make more sense.

mils


Restructure.txt
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: Restructure data

Maguin, Eugene
In reply to this post by mils
Why doesn't
Varstocases id=id/make q11new from q11_1 to q11_3.
Work?  From the excel file the q15.. variables are constant across values of q11..

Gene Maguin

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of mils
Sent: Wednesday, November 27, 2013 3:53 PM
To: [hidden email]
Subject: Restructure data

Hi,

I have the following data (see attached):

q11_1   q11_2   q11_3   q15a1   q15a2   q15b1   q15b2   q15c1   q15c2

Where q11  are usage level (1-7) of different treatments and q15 are attributes ratings for each drug (1-7).

I would like to restructure the data to get the following (see attached):

q11new  q15a1   q15a2   q15b1   q15b2   q15c1   q15c2


Any help will be much appreciate it.

Mils

Restructure.xlsx
<http://spssx-discussion.1045642.n5.nabble.com/file/n5723349/Restructure.xlsx>




-----
mils
--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Restructure-data-tp5723349.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

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

=====================
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
Reply | Threaded
Open this post in threaded view
|

Re: Restructure data

mils
In reply to this post by David Marso
Hi David,

Thanks for your response. That's exactly what I wanted.

Now, using your data...

DATA LIST LIST
  /q11_1 q11_2 q11_3 q15a1 q15a2 q15b1 q15b2 q15c1 q15c2.
BEGIN DATA
3 0 1 5 4 4 6 4 5
2 2 3 6 5 3 4 6 3
4 7 4 7 6 2 3 1 4
6 6 5 6 7 7 1 3 2
END DATA.


What should I do if I wanted to restructure the data and end up only with q11 (restructure of q11_1, q11_2, q11_3) and q15_1, q15_2 (restructure of  q15a1, q15a2, q15b1, q15b2, q15c1, q15c2) all in the same file. Is that possible?

Thanks in advance.
mils