Stata Postestimation Commands. Using -test-

  Рет қаралды 17,628

Alan Neustadtl

Alan Neustadtl

Күн бұрын

Пікірлер: 24
@garretttaylor6088
@garretttaylor6088 Жыл бұрын
THIS GUY ROCKS!!!!
@myeshajones2036
@myeshajones2036 4 жыл бұрын
Thanks Alan!
@jamiemorrison2672
@jamiemorrison2672 Жыл бұрын
Hi, do you know how to test for convergence within two variables?
@jt80995
@jt80995 8 жыл бұрын
Hi Alan, I'm trying to predict a rating from 1 through 10 for each observation in my sample. I'm looping a regression model to calculate for each observation. I'm struggling to find the correct postestimation command to use in order for the result of each observation to be categorised between 1 and 10. Would you know the best way to do this?
@drrahatjafri
@drrahatjafri 3 жыл бұрын
Here @5:06 what is the role of "if e(sample)", how is it different from "summ prestg80" command? Thanks!
@smilex3
@smilex3 3 жыл бұрын
Hi Rahat, When you use an estimation command in Stata, something like regress or logit, Stata keeps track of the observations used in the model that do not have any missing values by creating a temporary indicator variable coded 0 if the observation was not in the model and 1 if it was. This variable is called e(sample). It only exists white Stata is running and it will be replaced with new values whenever a model is estimated. In other words, it is ephemeral. If you want to save it or examine the values you could generate inmodel=e(sample) to add this to your dataset. Typically, it is used to conduct other analyses but only on observations in a particular model. See help help f_e for more information.
@michellecazar2440
@michellecazar2440 9 жыл бұрын
Thank you!
@smilex3
@smilex3 9 жыл бұрын
Michelle Cazar I'm glad you found the video helpful!
@suqh6371
@suqh6371 3 жыл бұрын
Hey Alan. Thank you for your explanation. I am still confused about the interpretation of line 8: test i.degree 2.degree 3.degree 4.degree. Why we do this test? How to interpret the result of the test? Thanks.
@smilex3
@smilex3 3 жыл бұрын
In a situation where you have may independent control variables but your main interest is on the varuabke degree, you may want to do an F-test comparing the reduced model, the model without degree but containing the other variables, to the full model with all the variables. If the variable degree is statistically significant than there should be a detectable reduction in the error sum of squares (and an equal increase in the regression sum of squares). The commands in lines 8 & 9 provide that test. To be clear, this command/test is technically not required for this model as the F-test located in the ANOVA table provides the identical test. But, this is only because there are no other independent variables.
@magnomendes7373
@magnomendes7373 7 жыл бұрын
Hello Alan. Excellent videos. Was wondering if you had the do-files available for download? It's kinda hard to search through a video to find out a specific need you might have. Anyways thank you for the videos.
@magnomendes7373
@magnomendes7373 7 жыл бұрын
PS: Can we download that song that plays at the beggining? Loved it. :)
@emiliaborko7016
@emiliaborko7016 4 жыл бұрын
Dear Alan, firstly I would like to thank you for the video! I have a question: is t test appropriate to check if the estimator is consistent? And how to interpret it?
@smilex3
@smilex3 4 жыл бұрын
An estimator of a particular parameter is said to be consistent if it converges in probability to the true value of the parameter as the sample size increases and tends to infinity. The sample mean is a consistent estimator for the population mean. The more data you collect, a consistent estimator will be close to the real population parameter you're trying to measure. The sample mean and sample variance are two well-known consistent estimators. But, I am not certain what you are looking to test?
@emiliaborko7016
@emiliaborko7016 4 жыл бұрын
@@smilex3 I mean how to check in stata if the estimator is consistent. I told stata to do a regression and now I wanna check if the estimator is consistent
@andressa3081
@andressa3081 8 жыл бұрын
Dear Alan, I am trying to test for linearity using the svy command with logistic regression. It seems to be limited to most of the tools I know such as the lrtest. Please advise. All the best Andressa
@smilex3
@smilex3 8 жыл бұрын
Hi Andressa. Can you clarify what you mean by linearity in this context? In a logistic regression, as your IV increases, the DV changes, but at different rates. if you express the change in probabilities. Here is an example: sysuse auto logistic foreign mpg margins, at(mpg=(12(1)41)) marginsplot, recast(line) noci
@iram4657
@iram4657 9 жыл бұрын
Dear Alan I have a question. in my model there are three dummy variables like CEO, CFO and others. I want to know how to run F-tests for the joint significance of each variable. Can you pleass tell me how to do it Best Iram Lancaster University
@smilex3
@smilex3 9 жыл бұрын
Iram Bhatti There are a couple of ways to do this. In the example below I load the auto dataset, drop observations where rep78==1 or rep78==2, then regress mpg on rep78. I use the test and tesparm post-estimation commands to test the joint significance of the two dummy variables. All of the tests below are the same. Best, Alan sysuse auto, clear drop if rep78
@ranganaimuneri8542
@ranganaimuneri8542 6 жыл бұрын
Dear Allan. I am having difficulties with performing the Hausman test after mlogit results
@choroyerebakia9275
@choroyerebakia9275 6 жыл бұрын
please I will be grateful if a see a video on the wald test, LM and LR test
@smilex3
@smilex3 6 жыл бұрын
Choro, here is some Stata code showing the LR test and Wald test. Hopefully, this is enough to get you going. Best, Alan /* Read data */ webuse nhanes2f, clear /* Estimate the reduced model */ logit diabetes height weight estimates store reduced /* Estimate the full model */ logit diabetes height weight age estimates store full /* Liklihood ratio test */ lrtest full reduced /* Note LLR's for full & reduced models & calculate by hand */ di 2*(-1788.1119 - -1933.9288 ) /* Estimate a model */ logit diabetes height weight age c.age#c.age /* Wald test for the interaction term */ test c.age#c.age /* Square root of chi2 is equal to z in output */ di 3.58^.5
@marcosantonioeuzebiodeoliv8515
@marcosantonioeuzebiodeoliv8515 2 жыл бұрын
I wanna the song of the into, please!
@smilex3
@smilex3 2 жыл бұрын
Stan Rogers - White Collar Holler (kzbin.info/www/bejne/qKSnnKCMpJeZnZY)
Stata Postestimation Commands.  Using -predict-
6:34
Alan Neustadtl
Рет қаралды 51 М.
Basic Regression Commands in Stata
24:58
Alan Neustadtl
Рет қаралды 48 М.
How Strong is Tin Foil? 💪
00:26
Preston
Рет қаралды 70 МЛН
SHAPALAQ 6 серия / 3 часть #aminkavitaminka #aminak #aminokka #расулшоу
00:59
Аминка Витаминка
Рет қаралды 164 М.
Regression Postestimation Commands in Stata: margins, pt. 1
12:05
Alan Neustadtl
Рет қаралды 36 М.
Heteroscedasticity Tests in Stata
6:54
SebastianWaiEcon
Рет қаралды 103 М.
Weak instruments tests
10:04
Mikko Rönkkö
Рет қаралды 20 М.
Postestimation Analysis (Part1) |Regression Analysis and Estimation Methods |Stata Tutorials Topic35
8:55
Dr. Bob Wen (Stata, Economics, Econometrics)
Рет қаралды 325
Regression Postestimation Commands in Stata: margins, pt. 2
17:43
Alan Neustadtl
Рет қаралды 25 М.
Summary of Interpreting a Regression Output from Stata
9:18
Justin Doran
Рет қаралды 312 М.
Poisson regression using Stata (June 2023)
16:41
Mike Crowson
Рет қаралды 7 М.
Stata Quick Tip: Margins
7:54
StataCorp LLC
Рет қаралды 53 М.
Quantile Regression in Stata
11:52
econometricsacademy
Рет қаралды 67 М.
92 #Hausman test #Breusch #Pagan #LM test and F test for Panel Models in Stata
19:02
RESEARCH MADE EASY WITH HIMMY KHAN
Рет қаралды 36 М.
How Strong is Tin Foil? 💪
00:26
Preston
Рет қаралды 70 МЛН