I currently have this do file in stata which is a simple test for significance in a matched pairs regression. I understand some basic python but I did not know if something like this is possible in python given my limited knowledge. I am using this for my uncle who is using python for his company. If anyone can guide me to some resources or explain how I would do this please let me know.
*import delimited "data"
drop if missing(v1,v2,v3)
regress v3 v2
test v2
generate pvalue = r(p)
if pvalue > .01 {
display "notsig"
display pvalue
}
if pvalue <= .01 {
display "sig"
display pvalue
}
drop pvalue
pvalueis not needed as you can condition onr(p)The test is given in theregressoutput any way.