BookmarkSubscribeRSS Feed
LeeSeongWoo_
Fluorite | Level 6

 

First of all, thank you for your time for my question.

 

I am currently analyzing the video viewing history data of many people.

 

However, this data does not have a user's score, so I need to create a score.

 

Here is my data: This gubun variable indicates that the user is in the following state:

 

USER   GUBUN  MOVIE   

1           F               A 

1           B               A

1           W              A

1           W              B

1           B               B

1           W              B

 

2           W              C

2           W              C

2           B               D

2           B               A

 

3           W              E

3           B               B

3           F               E

3           B               B

 

 

 

 

F is favorite, B is buy, W is watch

 

The data listing means that the action has taken place in that order.

 

I want to score the continuous behavior that users have been doing.

 

For example, a continuous F-B data set appears. In other words, I would like to treat it as a single action and assign it to a new variable if I made a purchase after clicking the Like button. I do not know how to evaluate continuous data.

 

example : 

 

user      F-B-W     F-B      W-B-W     W-W      B  .  W-F  .... (many combination possible )

  1            1             1            1            0         2         0    ....

  2            0             0            0             1        2         0               

 

I just want to know how to count sequence in ordered data. please give me some advice. 

 

Thanks in advance for your help.

3 REPLIES 3
Astounding
PROC Star

A few items that you will need to either confirm or clarify ...

 

If a user has no "B" observations, then it seems you want no output for that user. 

 

The sequences are determined for each User / Movie combination.

 

If a user's "B" observation occurs on only one movie, you still want the combinations for the other movies that don't have a "B".

 

What is the "Like button"?  Is there a variable in the data set that indicates "like"?

LeeSeongWoo_
Fluorite | Level 6

I want to make output even there is no B observations. for example , W-W also important , 

 

for modeling, i count many various sequences. 

 

 

 

it was my mistake,  i didn't write that like button means gubun =F ,

 

sorry. 🙂 

 

Astounding
PROC Star

OK, one question still unanswered.  What happens when ID=3 and the movie values alternate?  Are the sequences W-F and B-B?  Or do the sequences get measured by ignoring the MOVIE and just looking at GUBUN?

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1672 views
  • 0 likes
  • 2 in conversation