Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How does one consolidate into a single record with a frequency weight ?

    Hi I’ve got 4 score ordinal variables each with a score of 1-5 for procedure = 1 and procedure =0


    I’ve been advised to do the following:


    Those with an identical response and covariate vector can be consolidated into a single record with a frequency weight,


    Does this mean:

    Code:
    Duplicates tag(score1 score2 score3 score4 procedure), gen(duplicates)
    However , then how do I introduce - frequency weight- ?

    1. do i just drop those which aren’t unique values ?
    2. Or do i keep the whole dataset withoit dropping anytjing and use

    Code:
    contract score1 score2 score3 score4 procedure, freq[fw]
    Last edited by Rose Matthews; 12 Feb 2024, 12:24.

  • #2
    It's the last one. Use the -contract- command. BUT, the -freq()- option uses parentheses, not square brackets, to bind its argument.

    Comment


    • #3
      Thanks for this, I’ve managed to solve my previous problems with data… now onto graph plotting

      Comment

      Working...
      X