Hi All,
I am new to the Mata programming and currently trying to convert some codes from Matlab to Stata using Mata. I am sorry if my question seems rather straightforward.
I would need to create functions that can be ran individually. Should I use ado files or do-files to create the functions?
Also, when I tried to run a do-file with Mata, it seems that the program cannot be ran automatically by hitting the Execute button. Does that mean I shouldn't add the command "Mata" and "end" to the do-file?
Thank you in advance!
Related Posts with Create Functions using Mata
GLM - Offset termHi, I am running a GLM - Poisson Family Identity Link model to show the impact of various predictor …
egen command related to count based on a conditionDear All Code: input str1 firm float(sales) int year "a" . 2010 "a" . 2011 "a" 5 2012 "b" 6 2010 "b…
Factor calculation based on dual variable namesHi, I am trying to calculate a currency value factor based on currency spot and lagged exchange rat…
same code, same data, different results (sort isn't working)I am dropping observations based on the if statement (drop if entryyear~=entryyear_surv) written in …
IV approach flips the signs of exogenous covariates' coefficient estimatesAfter implementing an IV probit model, the signs of many exogenous covariates' coefficient estimates…
Subscribe to:
Post Comments (Atom)
0 Response to Create Functions using Mata
Post a Comment