Hello,
I created this program, which I am trying to apply in the code later:
program fixK
renvars q11-q20 , prefix(temp)
rename tempq11 q1
rename tempq12 q2
rename tempq13 q3
rename tempq14 q4
rename tempq15 q5
rename tempq16 q6
rename tempq17 q7
rename tempq18 q8
rename tempq19 q9
rename tempq20 q10
end
This program was later applied to:
import excel "C:\Users\name\Desktop\folder\file.xlsx", sheet("Sheet1") firstrow clear
fixK
renvars * , prefix(a_)
When I run the "program" command, it runs fine. However, when I run "fixK" command later to apply to the dataset, it gives me an error message saying "variable tempq11 is not found (r111)".
I need to give the dataset a set of temp numbers because while trying to merge two datasets, I realized that one of the datasets had numberings off. Please help.
Thank you so much!
Related Posts with using "program" command and applying the "program" created
Question about the effect of adding control variables on estimateDear all, I do a research using instrumental variables, the main problem is that we are not sure wh…
How do I perform VIF test after xtregDear Experts, I have run the following xtreg xtreg x fdi l k m lc, fe vce(robust) Is there need to p…
mlogit - coefficent and marginal effects with different singsHi, I am running a multinational logistic regression with the mlogit command. I have noticed that t…
Drop variables with common suffix under certain conditionsDear all, I am facing difficulties in dropping some variables conditional on the missing observatio…
Frequency table for multiple variablesDear all, As a fairly new user of Stata, I would appreciate any suggestions to create a frequency t…
Subscribe to:
Post Comments (Atom)
0 Response to using "program" command and applying the "program" created
Post a Comment