I have been using the syntax format below to replace the data in the columns with the relevant med_costs which has worked for 4 sets of columns. When I run the code for the eczema related column data with the costs listed in the med_costs column the below syntax isn't working.
gen Eczema_related=.
replace Eczema_related=med_costs if med_name_group=="Eczema_related"
Do you have any suggestions of how to fix this?
Related Posts with Replace function- no real changes issue
-estout- returning "file could not be opened" error except for tex filesI'm running into a puzzling situation where I'm receiving the "file [XYZ] could not be opened" error…
RE: Creating simulated dataHello, I generated a dummy variable using the following code: gen employed = 1 + int(2*runiform()) …
Problem with selecting only one county per stateHey there, I am a bit new to Stata, so I hope my question will be clear enough. I am looking at the …
Regression over time, industry, company, country, timeHello, I would like to regress the following equation: DV_{i,c,j,t} = a_i+α_c+α_j+a_t+beta * (IV_i*…
What are .r values in a dataset? Can all values be replaced with 0?Hello, I have ".r" values in my dataset and I am unable to figure out why. Data comes from MSCI (KL…
Subscribe to:
Post Comments (Atom)
0 Response to Replace function- no real changes issue
Post a Comment