Multiple weighted variables

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

Multiple weighted variables

Stefan Keydel
Hello,

I'd wager that a variation of this question has already been
posed, but the archive is so huge that, after wading through it
a bit, I've decided simply to pose my question:

I have a dataset with customer satisfaction scores for a group
of phone agents over a range of months, along with the
corresponding number of survey responses that went into the
score for each month. What I want to do is create weighted
variables for each month, based on the survey count. The data
table might look as follows:

Agent       Jan     Count       Feb     Count       March       Count
----------------------------------------------------------------------
Agent A     .75         3         .85       2
.80             4
Agent B     .65         6         .70       2
.85             1
...

How can I create 3 separate weighted variables for January,
February, and March, based on the respective counts of surveys
per agent? Or am I even asking the right question?

Incidentally, the ultimate aim is to run a couple paired-sample
t-tests to determine whether a specific "treatment" has resulted
in significant changes to the customer satisfaction scores.

Thanks,

Stefan
Reply | Threaded
Open this post in threaded view
|

R: Multiple weighted variables

Luca Meyer
Hello Stefan,

What you are saying it makes sense to me if you have to compare different
agents. I therefore assume that the specific "treatment" has been applied to
some agents and not to others. In other words, I want to test if the
weighted average score for some agents is significantly higher(smaller) than
the same score for other agents.

Here is the syntax I tested:

/** first i generate some sample data **/
DATA LIST LIST/ AGENT (A10) PERC_JAN COUNT_JAN PERC_FEB COUNT_FEB PERC_MAR
COUNT_MAR (6f2.2).
BEGIN DATA
AGENT_A ,75 3 ,85 2 ,90 3
AGENT_B ,65 6 ,70 2 ,80 4
AGENT_C ,70 4 ,75 4
AGENT_D ,80 5 , , ,85 7
END DATA.
EXE.

/** i then classify agents into testing groups, assuming that AGENT_A and
AGENT_B are part of GROUP 1, while the others are part of GROUP 2 **/
RECODE AGENT ("AGENT_A"=1) ("AGENT_B"=1) (ELSE=2) INTO GROUP .
CROSSTABS AGENT BY GROUP.

/** now i compute the weighted scores mean for each agent **/
COMPUTE #NUM=0.
COMPUTE #DEN=0.
DO REPEAT V1=PERC_JAN PERC_FEB PERC_MAR /V2=COUNT_JAN COUNT_FEB COUNT_MAR.
        DO IF V1>0 AND V2>0.
                COMPUTE #NUM=#NUM+(V1*V2).
                COMPUTE #DEN=#DEN+V2.
        END IF.
END REPEAT.
COMPUTE WMEAN=#NUM/#DEN.
EXE.

/** i then run the paired t-test **/
T-TEST
  PAIRS = GROUP  WITH WMEAN (PAIRED)
  /CRITERIA = CI(.95)
  /MISSING = ANALYSIS.

Let me know if I have corretly interpreted your needs or if you actually
need something else.

Luca

Mr. Luca MEYER
Market research, data analysis & more
www.lucameyer.com - Tel: +39.339.495.00.21

-----Messaggio originale-----
Da: SPSSX(r) Discussion [mailto:[hidden email]] Per conto di
Stefan Keydel
Inviato: martedì 19 giugno 2007 7.00
A: [hidden email]
Oggetto: Multiple weighted variables

Hello,

I'd wager that a variation of this question has already been posed, but the
archive is so huge that, after wading through it a bit, I've decided simply
to pose my question:

I have a dataset with customer satisfaction scores for a group of phone
agents over a range of months, along with the corresponding number of survey
responses that went into the score for each month. What I want to do is
create weighted variables for each month, based on the survey count. The
data table might look as follows:

Agent       Jan     Count       Feb     Count       March       Count
----------------------------------------------------------------------
Agent A     .75         3         .85       2
.80             4
Agent B     .65         6         .70       2
.85             1
...

How can I create 3 separate weighted variables for January, February, and
March, based on the respective counts of surveys per agent? Or am I even
asking the right question?

Incidentally, the ultimate aim is to run a couple paired-sample t-tests to
determine whether a specific "treatment" has resulted in significant changes
to the customer satisfaction scores.

Thanks,

Stefan

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.472 / Virus Database: 269.9.0/853 - Release Date: 18/06/2007
15.02
 

No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.472 / Virus Database: 269.9.0/853 - Release Date: 18/06/2007
15.02
 
Reply | Threaded
Open this post in threaded view
|

Re: R: Multiple weighted variables

Stefan Keydel
Hi Luca,

I will try this-- thank you for this! My situation is a little
bit different, in that I'm trying to compare the performance of
one set of agents before and after treatment. Do you know if
this syntax will work for this, as well? I think it will, or?

Thank you,

Stefan
On Tuesday, June 19, 2007 at 12:41, Luca Meyer wrote:

>Hello Stefan,
>
>What you are saying it makes sense to me if you have to compare different
>agents. I therefore assume that the specific "treatment" has been applied to
>some agents and not to others. In other words, I want to test if the
>weighted average score for some agents is significantly higher(smaller) than
>the same score for other agents.
>
>Here is the syntax I tested:
>
>/** first i generate some sample data **/
>DATA LIST LIST/ AGENT (A10) PERC_JAN COUNT_JAN PERC_FEB COUNT_FEB PERC_MAR
>COUNT_MAR (6f2.2).
>BEGIN DATA
>AGENT_A ,75 3 ,85 2 ,90 3
>AGENT_B ,65 6 ,70 2 ,80 4
>AGENT_C ,70 4 ,75 4
>AGENT_D ,80 5 , , ,85 7 END DATA.
>EXE.
>
>/** i then classify agents into testing groups, assuming that AGENT_A and
>AGENT_B are part of GROUP 1, while the others are part of GROUP 2 **/
>RECODE AGENT ("AGENT_A"=1) ("AGENT_B"=1) (ELSE=2) INTO GROUP .
>CROSSTABS AGENT BY GROUP.
>
>/** now i compute the weighted scores mean for each agent **/
>COMPUTE #NUM=0.
>COMPUTE #DEN=0.
>DO REPEAT V1=PERC_JAN PERC_FEB PERC_MAR /V2=COUNT_JAN COUNT_FEB COUNT_MAR.
>DO IF V1>0 AND V2>0.
>COMPUTE #NUM=#NUM+(V1*V2).
>COMPUTE #DEN=#DEN+V2.
>END IF.
>END REPEAT.
>COMPUTE WMEAN=#NUM/#DEN.
>EXE.
>
>/** i then run the paired t-test **/
>T-TEST
>PAIRS = GROUP  WITH WMEAN (PAIRED)
>/CRITERIA = CI(.95)
>/MISSING = ANALYSIS.
>
>Let me know if I have corretly interpreted your needs or if you actually
>need something else.
>
>Luca
>
>Mr. Luca MEYER
>Market research, data analysis & more
>www.lucameyer.com - Tel: +39.339.495.00.21
>
>-----Messaggio originale-----
>Da: SPSSX(r) Discussion [mailto:[hidden email]] Per conto di
>Stefan Keydel
>Inviato: martedì 19 giugno 2007 7.00
>A: [hidden email]
>Oggetto: Multiple weighted variables
>
>Hello,
>
>I'd wager that a variation of this question has already been posed, but the
>archive is so huge that, after wading through it a bit, I've decided simply
>to pose my question:
>
>I have a dataset with customer satisfaction scores for a group of phone
>agents over a range of months, along with the corresponding number of survey
>responses that went into the score for each month. What I want to do is
>create weighted variables for each month, based on the survey count. The
>data table might look as follows:
>
>Agent       Jan     Count       Feb     Count       March       Count
>----------------------------------------------------------------------
>Agent A     .75         3         .85       2
>.80             4
>Agent B     .65         6         .70       2
>.85             1
>...
>
>How can I create 3 separate weighted variables for January, February, and
>March, based on the respective counts of surveys per agent? Or am I even
>asking the right question?
>
>Incidentally, the ultimate aim is to run a couple paired-sample t-tests to
>determine whether a specific "treatment" has resulted in significant changes
>to the customer satisfaction scores.
>
>Thanks,
>
>Stefan
>
>No virus found in this incoming message.
>Checked by AVG Free Edition. Version: 7.5.472 / Virus Database:
>269.9.0/853 - Release Date: 18/06/2007
>15.02
>
>
>No virus found in this outgoing message.
>Checked by AVG Free Edition. Version: 7.5.472 / Virus Database:
>269.9.0/853 - Release Date: 18/06/2007
>15.02
>