0

While creating this variable in stata14 I've got an error (198) this is the variable that I want to generate:

g ncskew =(-(([_n])*([_n-1])^(1.5)*(sum(returns^3))))///
/(([_n-1])*([_n-2])*(sum(returns^2)^(1.5))

It is quite a puzzle but I think that the brackets are well placed. Any help or advice would be appreciated.

1
  • If you want to use observation numbers _n to mean number of observations so far (and I can't make sense of your calculation otherwise) then the square brackets are redundant. Commented Mar 25, 2018 at 14:16

1 Answer 1

1

The problem that jumps out at my eye is that the /// at the end of the first line is not preceded by any whitespace. That is a syntax error.
The other problem is that you have 13 opening parentheses ( and just 12 closing parentheses ). Is this your actual code or a mis-typed copy?

Whether that are the only problems with your code, I cannot say. If that is your actual code, fix that first and see what happens.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.