Announcement

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

  • invalid (variable) r(198) - What does this mean?

    Hi there,

    I am trying to run a factor analysis on state (
    Code:
    factor, R1, R2, etc, pcf
    however, it is coming up with this error message:

    Code:
    invalid 'R5'
    r(198) ;
    I've checked the variable R5 - no missing data, it looks the same as other variables and I've even renamed the variable but still no difference. What am I doing wrong?

    thanks,
    L

  • #2
    Welcome to the Stata Forum / Statalist,

    Please type - help factor - and check the correct command.

    To start, no comma after "factor" and before varlist. Also, no comma between variables.

    Please read again the FAQ, particularly the advice to inform "exactly" what you typed. This is the best way to entail an insightful reply.
    Last edited by Marcos Almeida; 21 Jan 2019, 05:49.
    Best regards,

    Marcos

    Comment


    • #3
      You're confusing Stata with extra commas. You're also confusing us because the text R5 nowhere appears in the command line you give. My guess is that you should have typed something more like

      Code:
      factor R1 R2 R3 R4 R5, pcf 
      In a command like this, the comma should typically appear once and once only.

      https://www.statalist.org/forums/help#stata advises

      Say exactly what you typed and exactly what Stata typed (or did) in response. N.B. exactly!
      That means: paraphrases and simplifications intended to be helpful -- in this case perhaps "etc" -- usually aren't. We want exact copy and paste from your Stata.

      Comment

      Working...
      X