Hello,
I am trying to replace a variable so that when I create a graph for GDPpc it shows GDPpc below 20k and above 30k. the starting gdp variable is gdppc
I used: 'generate code_gdppc2 = "" ' to make a string variable, then:
replace code_gdppc2 = code_gdppc if gdppc < 20000
However, when this is run it says 0 real changes made and I cannot for the life of me figure out why.
or to get my desired result I run:
'replace code_gdppc2 = code_gdppc if gdppc < 20000 & gdppc > 30000'
and this says 'code_gdppc ambiguous abbreviation'
what is the way around this?
Apologies if this is classed as an elementary question, I am new here and have no other place to turn for an answer.
Thank you.
Related Posts with Trying to replace a variable with a new generated variable
log (pseudo)likelihood and wald chi²Hello, I am wondering what log pseudolikelihood and wald chi² mean in het output of logit. After re…
Examples of programs with suboptionsHi all, I'm looking to review a few programs' ado files that have suboptions. By suboptions I mean …
question about perfectly predicted variables in logitHello, I was reading the pdf file of logit and it states: "..perfect predictor variables and their …
correlation in one wave data and panel datahello, I have constructed a correlation matrix of a one wave data and a panel data set to examine t…
different levels of significance logit vs marginsHello, I am running a logistic regression with the log odds and the marginal effects as coefficient…
Subscribe to:
Post Comments (Atom)
0 Response to Trying to replace a variable with a new generated variable
Post a Comment