Hi everyone,
I am trying to create a descriptive statistics table of my data but only for the cases in which all the variables are observed in order to have the same number of observations for all my variables.
When I run the following command:
[sum country1 cid year fdiunctad1 fdiwdi1 wgi1 icrg csp acled ucdpdeaths ucdpconflicts edb91 edb51 gdpgrowth1 gdppercapita1 trade1 inflation1 exchangerate1 telephone1 cellphone1 education1 if country1!=. & cid!=. & year!=. fdiunctad1!=. & fdiwdi1!=. & wgi1!=. icrg!=. & csp!=. & acled!=. ucdpdeaths!=. & ucdpconflicts!=. & edb91!=. edb51!=. & gdpgrowth1!=. & gdppercapita1!=. trade1!=. & inflation1!=. & exchangerate1!=. telephone1!=. & cellphone1!=. & education1!=.]
Stata tells me that whichever variable after year is invalid and it gives me the error r(198).
Can you see any mistake in the formula or would you know what is the reason of it?
Thank you very much in advance.
Regards,
Siham
Related Posts with Descriptive statistics if command error r(198)
Returning pointer matrixes in functionsThis idea is probably well known to serious Mata programmers, but I've recently come across what app…
Reshape with many variablesDear All, I have a very large dataset (approx. 29,000 variables) which looks like this: Code: * E…
Creating new dummyI have a dataset on companies with distinct id, products they sell, the region they sell their produ…
New package: simulate2 and psimulate2Thanks to Kit Baum a new package is available on SSC. simulate2 and psimulate2 enhance and parallali…
Problem with String Variable in Collapse CommandDear all, I am using Stata 16, on mac. I must collapse my data to region-by-year level. The problem…
Subscribe to:
Post Comments (Atom)
0 Response to Descriptive statistics if command error r(198)
Post a Comment