Quantcast

Invert Likert-Scale Values

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Invert Likert-Scale Values

Alexis Delevett
Hi!

I am using R to process some community survey data. Several item responses are recorded via a 7-point Likert-Scale. As I have coded the responses, 1 represents high agreement, and 7 high disagreement. This of course impacts the coefficients in a linear regression (of example agreement to self-perception measures on housing satisfaction). For some purposes, in order to make the coefficients more accessible to the reader, I would like to invert the item values, i.e. to arrive at 1 for high disagreement, and 7 for high agreement (such that the linear regression would express something like "the higher the agreement on A, the greater the B).

Is there an already existing function for this, or do I use a custom replace loop in R?

Thank you, Alexis

       
---------------------------------

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Invert Likert-Scale Values

John Kane-2
Will ?recode in the car package do what you want?
 x <- 1:4
 recode(x, "1='4';2='3' ;3='2'; 4='1'")


--- Alexis Delevett <[hidden email]> wrote:

> Hi!
>
> I am using R to process some community survey data.
> Several item responses are recorded via a 7-point
> Likert-Scale. As I have coded the responses, 1
> represents high agreement, and 7 high disagreement.
> This of course impacts the coefficients in a linear
> regression (of example agreement to self-perception
> measures on housing satisfaction). For some
> purposes, in order to make the coefficients more
> accessible to the reader, I would like to invert the
> item values, i.e. to arrive at 1 for high
> disagreement, and 7 for high agreement (such that
> the linear regression would express something like
> "the higher the agreement on A, the greater the B).
>
> Is there an already existing function for this, or
> do I use a custom replace loop in R?
>
> Thank you, Alexis
>
>        
> ---------------------------------
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained,
> reproducible code.
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Invert Likert-Scale Values

Ted.Harding
On 04-Aug-07 16:42:23, John Kane wrote:
> Will ?recode in the car package do what you want?
>  x <- 1:4
>  recode(x, "1='4';2='3' ;3='2'; 4='1'")

Is thre a problem with just using

  New <- (8 - Old)

??

Ted.

> --- Alexis Delevett <[hidden email]> wrote:
>
>> Hi!
>>
>> I am using R to process some community survey data.
>> Several item responses are recorded via a 7-point
>> Likert-Scale. As I have coded the responses, 1
>> represents high agreement, and 7 high disagreement.
>> This of course impacts the coefficients in a linear
>> regression (of example agreement to self-perception
>> measures on housing satisfaction). For some
>> purposes, in order to make the coefficients more
>> accessible to the reader, I would like to invert the
>> item values, i.e. to arrive at 1 for high
>> disagreement, and 7 for high agreement (such that
>> the linear regression would express something like
>> "the higher the agreement on A, the greater the B).
>>
>> Is there an already existing function for this, or
>> do I use a custom replace loop in R?
>>
>> Thank you, Alexis
>>
>>        
>> ---------------------------------
>>
>>      [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> [hidden email] mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained,
>> reproducible code.
>>
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <[hidden email]>
Fax-to-email: +44 (0)870 094 0861
Date: 04-Aug-07                                       Time: 18:06:38
------------------------------ XFMail ------------------------------

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Invert Likert-Scale Values

Dieter Menne
In reply to this post by Alexis Delevett
Alexis Delevett <adelevet <at> yahoo.com> writes:

> I am using R to process some community survey data. Several item responses are
recorded via a 7-point
> Likert-Scale. As I have coded the responses, 1 represents high agreement, and
7 high disagreement. This
> of course impacts the coefficients in a linear regression (of example
agreement to self-perception
> measures on housing satisfaction). For some purposes, in order to make the
coefficients more accessible
> to the reader, I would like to invert the item values, i.e. to arrive at 1 for
high disagreement, and 7 for
> high agreement (such that the linear regression would express something like
"the higher the agreement
> on A, the greater the B).
>
> Is there an already existing function for this, or do I use a custom replace
loop in R?

It's a rarely used function called '-'

x=c(1,7,3,4)
y=8-x
y

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Invert Likert-Scale Values

Alexis Delevett
In reply to this post by John Kane-2
Thank you John, that should definitely do the trick!

Furthermore, I believe that this will help me research
the available resources more effectively in the future
-- instead of researching a specific problem (e.g.,
"invert Likert-Scale items"), I might try starting out
with a more general problem (like "recode values") in
order to work my way towards a solution.



--- John Kane <[hidden email]> wrote:

> Will ?recode in the car package do what you want?
>  x <- 1:4
>  recode(x, "1='4';2='3' ;3='2'; 4='1'")
>
>
> --- Alexis Delevett <[hidden email]> wrote:
>
> > Hi!
> >
> > I am using R to process some community survey
> data.
> > Several item responses are recorded via a 7-point
> > Likert-Scale. As I have coded the responses, 1
> > represents high agreement, and 7 high
> disagreement.
> > This of course impacts the coefficients in a
> linear
> > regression (of example agreement to
> self-perception
> > measures on housing satisfaction). For some
> > purposes, in order to make the coefficients more
> > accessible to the reader, I would like to invert
> the
> > item values, i.e. to arrive at 1 for high
> > disagreement, and 7 for high agreement (such that
> > the linear regression would express something like
> > "the higher the agreement on A, the greater the
> B).
> >
> > Is there an already existing function for this, or
> > do I use a custom replace loop in R?
> >
> > Thank you, Alexis
> >
> >        
> > ---------------------------------
> >
> > [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > [hidden email] mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> > http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained,
> > reproducible code.
> >
>
>
>
>       Get news delivered with the All new Yahoo!
> Mail.  Enjoy RSS feeds right on your Mail page.
> Start today at
> http://mrd.mail.yahoo.com/try_beta?.intl=ca
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Invert Likert-Scale Values

Alexis Delevett
In reply to this post by Dieter Menne
Hi!

I had already been greatful about John Kane's response
(using the car library's recode function), and I would
have gone with that -- along with the promise to
research any questions I may have in the future more
intelligently.

Now I'm thinking it's not a matter of researching, but
of plain and simple logic. Sorry to have made you guys
help me with my ABCs, but I do see it as an
opportunity to apreciate it as a lesson learned.

Alexis

--- Dieter Menne <[hidden email]> wrote:

> Alexis Delevett <adelevet <at> yahoo.com> writes:
>
> > I am using R to process some community survey
> data. Several item responses are
> recorded via a 7-point
> > Likert-Scale. As I have coded the responses, 1
> represents high agreement, and
> 7 high disagreement. This
> > of course impacts the coefficients in a linear
> regression (of example
> agreement to self-perception
> > measures on housing satisfaction). For some
> purposes, in order to make the
> coefficients more accessible
> > to the reader, I would like to invert the item
> values, i.e. to arrive at 1 for
> high disagreement, and 7 for
> > high agreement (such that the linear regression
> would express something like
> "the higher the agreement
> > on A, the greater the B).
> >
> > Is there an already existing function for this, or
> do I use a custom replace
> loop in R?
>
> It's a rarely used function called '-'
>
> x=c(1,7,3,4)
> y=8-x
> y
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained,
> reproducible code.
>



       
____________________________________________________________________________________
Got a little couch potato?
Check out fun summer activities for kids.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Invert Likert-Scale Values

William Revelle
In reply to this post by Alexis Delevett
Alexis and John,

To reverse a Likert like item, subtract the item from the maximum
acceptable value + the minimum acceptable value,
That is, if
x <- 1:8
xreverse <- 9-x

Bill


At 2:16 PM -0700 8/4/07, Alexis Delevett wrote:

>Thank you John, that should definitely do the trick!
>
>Furthermore, I believe that this will help me research
>the available resources more effectively in the future
>-- instead of researching a specific problem (e.g.,
>"invert Likert-Scale items"), I might try starting out
>with a more general problem (like "recode values") in
>order to work my way towards a solution.
>
>
>
>--- John Kane <[hidden email]> wrote:
>
>>  Will ?recode in the car package do what you want?
>>   x <- 1:4
>>   recode(x, "1='4';2='3' ;3='2'; 4='1'")
>>
>>
>>  --- Alexis Delevett <[hidden email]> wrote:
>>
>>  > Hi!
>>  >
>>  > I am using R to process some community survey
>>  data.
>>  > Several item responses are recorded via a 7-point
>>  > Likert-Scale. As I have coded the responses, 1
>>  > represents high agreement, and 7 high
>>  disagreement.
>>  > This of course impacts the coefficients in a
>>  linear
>>  > regression (of example agreement to
>>  self-perception
>>  > measures on housing satisfaction). For some
>>  > purposes, in order to make the coefficients more
>>  > accessible to the reader, I would like to invert
>>  the
>>  > item values, i.e. to arrive at 1 for high
>>  > disagreement, and 7 for high agreement (such that
>>  > the linear regression would express something like
>>  > "the higher the agreement on A, the greater the
>>  B).
>>  >
>>  > Is there an already existing function for this, or
>>  > do I use a custom replace loop in R?
>>  >
>>  > Thank you, Alexis
>>  >
>>  >      
>>  > ---------------------------------
>>  >
>>  > [[alternative HTML version deleted]]
>>  >
>>  > ______________________________________________
>>  > [hidden email] mailing list
>>  > https://stat.ethz.ch/mailman/listinfo/r-help
>>  > PLEASE do read the posting guide
>>  > http://www.R-project.org/posting-guide.html
>>  > and provide commented, minimal, self-contained,
>>  > reproducible code.
>>  >
>>
>>
>>
>>        Get news delivered with the All new Yahoo!
>>  Mail.  Enjoy RSS feeds right on your Mail page.
>>  Start today at
>>  http://mrd.mail.yahoo.com/try_beta?.intl=ca
>>
>
>______________________________________________
>[hidden email] mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.


--
William Revelle http://personality-project.org/revelle.html
Professor http://personality-project.org/personality.html
Department of Psychology             http://www.wcas.northwestern.edu/psych/
Northwestern University http://www.northwestern.edu/
Use R for statistics:                          http://personality-project.org/r

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Invert Likert-Scale Values

Ted.Harding
On 04-Aug-07 22:02:33, William Revelle wrote:
> Alexis and John,
>
> To reverse a Likert like item, subtract the item from the maximum
> acceptable value + the minimum acceptable value,
> That is, if
> x <- 1:8
> xreverse <- 9-x
>
> Bill

A few of us have suggested this, but Alexis's welcome for the
recode() suggestion indicates that by the time he gets round to
this his Likert scale values have already become levels of a factor.

Levels "1", "2", ... of a factor may look like integers, but they're
not; and R will not let you do arithmetic on them:

> x<-factor(c(1,1,1,2,2,2))
> x
[1] 1 1 1 2 2 2
Levels: 1 2
> y<-(3-x)
Warning message:
"-" not meaningful for factors in: Ops.factor(3, x)
> y
[1] NA NA NA NA NA NA

However, you can turn them back into integers, reverse, and then
turn the results back into a factor:

> y <- factor(3 - as.integer(x))
> y
[1] 2 2 2 1 1 1
Levels: 1 2

So, even for factors, the insight undelying our suggestion of "-"
is still valid! :)

Best wishes,
Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <[hidden email]>
Fax-to-email: +44 (0)870 094 0861
Date: 05-Aug-07                                       Time: 00:09:58
------------------------------ XFMail ------------------------------

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Invert Likert-Scale Values

Alexis Delevett
You guys come up with some amazing stuff! Of course,
however, I'm not exactly able to more than just
acknowledge your input at some point... I feel I'm
lacking some vital basics. Be that as it may, I
thought I'd let you know what's happened to your input
on my side:

glm(recode(PLANMOV, "'yes'='no'; 'no'='yes'")~
log(8-ATTMT_AVG), family=binomial(link="probit"),
data=dta),

with PLANMOV as a dichotomous variable on whether at
the time a move is planned, and ATTMT_AVG as the
average of some 9 Likert-Scale coded items, where 1 is
high agreement and 7 is high disagreement.

Since the underlying theoretical rationale is that
greater attachment to the home will per definitionem
mean a smaller tendency to move, combining the recode
and inversion-by-subtraction approaches means to
represent functionally the structure of the
theoretical argument.

So while of course the coefficient is the same, I
think it is an achievement to be able to express a
thought statistically in the same way I do mentally,
and not just by implication (i.e. when I find that low
attachment means greater willingness to move as is the
direct reading of the untransformed function).

Cheers, Alexis


--- [hidden email] wrote:

> On 04-Aug-07 22:02:33, William Revelle wrote:
> > Alexis and John,
> >
> > To reverse a Likert like item, subtract the item
> from the maximum
> > acceptable value + the minimum acceptable value,
> > That is, if
> > x <- 1:8
> > xreverse <- 9-x
> >
> > Bill
>
> A few of us have suggested this, but Alexis's
> welcome for the
> recode() suggestion indicates that by the time he
> gets round to
> this his Likert scale values have already become
> levels of a factor.
>
> Levels "1", "2", ... of a factor may look like
> integers, but they're
> not; and R will not let you do arithmetic on them:
>
> > x<-factor(c(1,1,1,2,2,2))
> > x
> [1] 1 1 1 2 2 2
> Levels: 1 2
> > y<-(3-x)
> Warning message:
> "-" not meaningful for factors in: Ops.factor(3, x)
> > y
> [1] NA NA NA NA NA NA
>
> However, you can turn them back into integers,
> reverse, and then
> turn the results back into a factor:
>
> > y <- factor(3 - as.integer(x))
> > y
> [1] 2 2 2 1 1 1
> Levels: 1 2
>
> So, even for factors, the insight undelying our
> suggestion of "-"
> is still valid! :)
>
> Best wishes,
> Ted.
>
>
--------------------------------------------------------------------
> E-Mail: (Ted Harding) <[hidden email]>
> Fax-to-email: +44 (0)870 094 0861
> Date: 05-Aug-07                                    
>  Time: 00:09:58
> ------------------------------ XFMail
> ------------------------------
>



      ____________________________________________________________________________________

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Invert Likert-Scale Values

Peter Dalgaard
In reply to this post by Ted.Harding
(Ted Harding) wrote:

> On 04-Aug-07 22:02:33, William Revelle wrote:
>  
>> Alexis and John,
>>
>> To reverse a Likert like item, subtract the item from the maximum
>> acceptable value + the minimum acceptable value,
>> That is, if
>> x <- 1:8
>> xreverse <- 9-x
>>
>> Bill
>>    
>
> A few of us have suggested this, but Alexis's welcome for the
> recode() suggestion indicates that by the time he gets round to
> this his Likert scale values have already become levels of a factor.
>
> Levels "1", "2", ... of a factor may look like integers, but they're
> not; and R will not let you do arithmetic on them:
>
>  
>> x<-factor(c(1,1,1,2,2,2))
>> x
>>    
> [1] 1 1 1 2 2 2
> Levels: 1 2
>  
>> y<-(3-x)
>>    
> Warning message:
> "-" not meaningful for factors in: Ops.factor(3, x)
>  
>> y
>>    
> [1] NA NA NA NA NA NA
>
> However, you can turn them back into integers, reverse, and then
> turn the results back into a factor:
>
>  
>> y <- factor(3 - as.integer(x))
>> y
>>    
> [1] 2 2 2 1 1 1
> Levels: 1 2
>
> So, even for factors, the insight undelying our suggestion of "-"
> is still valid! :)
>  
Er, wouldn't   y <- factor(x, levels=2:1, labels=1:2)  be more to the point?

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Loading...