Hey everyone,
I am trying to write a program that will do logistics on different variables. Final syntax for the user should look like this:
(Command) var1 var2 var3 var4, outcome(var5)
my program should run logistics
var5 var1
var5 var2
var5 var3
var5 var4
(and do more, I am just getting started!)
I wrote
program define (program’s name)
syntax varlist [if], yvar(varname)
Foreach v of varlist ‘varlist’ {
quietly logistics ‘yvar’ ‘varlist’
}
does it make sense? How do I incorporate ‘outcome’ in the final user syntax in my program?
Related Posts with Program a logistics command
Unbalanced panel data analysisHi dear all i hope you all fine ...i am undergoing a problem in running analysis on the data ,the de…
foreach- reorganising multiple variablesHi, I am new to STATA and I am struggling to reorganise a large dataset using loops. Each id repre…
How to draw a correlation forest map with the admetan command?Dear Statalist, I have recently done a meta-analysis of the correlation coefficient, but I encounter…
GLM or Tobit Regression & Forecast for different distributions (incl. zero inflation)Dear Statalists, I'd very much like to hear your opinion on the following. What I’m trying to do: …
Using atcontrasts in margins for a mixed effect modelHi everyone I am currently working on a project (using Stata 15) to analyse changes in kidney funct…
Subscribe to:
Post Comments (Atom)
0 Response to Program a logistics command
Post a Comment