Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Stata is a proprietary cross-platform general-purpose statistical software package.

0
votes
0answers
17 views

descriptive statistics [on hold]

I have some data with overall firm revenue. I have revenue by department (and further split into types of projects) and by fiscal year. I'd like to run some interesting descriptive statistics in stata....
0
votes
0answers
10 views

regression d'un modéle probit [on hold]

I need to know the tests that need to be done for a probit regression model and the command of these tests with the stata ? Is it necessary to perform a multicollinearity test? I want to know how can ...
0
votes
1answer
25 views

What is the variance of the error term used by the logit command in stata?

I would like to compare the coefficients from the same model estimated by the logit and probit command. I think that the probit model is estimated normalizing the variance of the error term to 1. What ...
0
votes
0answers
17 views

In R, How can I calculate the elasticity of Y with respect to X, when Y is binary?

I have a dataset that I am doing in R and I need to calculate elasticities in it. To simplify my model, I have Y = XB + u, and I need to find the elasticity of Y with respect to X. My investigation ...
1
vote
1answer
56 views

Predicting probabilities after log-linear regression

I would like to estimate a log-linear regression and examine the results with Stata's marginsplot command. I have transformed my dependent variable into natural logarithm (to make a highly skewed ...
1
vote
0answers
24 views

Test equality between coefficients in STATA

I have a very basic question. I use two equations: \begin{equation} y_{it}=\beta*X_{it}+\theta*C_{it}+ \sigma_{i}+\tau_{t}+\epsilon_1 \\ z_{it}=\omega*X_{it}+\sigma*C_{it}+ \lambda_{i}+\gamma_{t}+\...
0
votes
0answers
14 views

Interaction of categorical variables [closed]

I would like to interact two categorical variables: agecat and female regress income i.agecat#i.female This will give me all combinations agecat (1-10) and ...
0
votes
0answers
11 views

2SLS IV with endogenous interaction in Stata: Difference between ivreg2 and manual estimates

I want to estimate 2SLS in Stata with two endogenous, continuous variables: $X_1$ and the interaction term $X_1*X_2$. The other IVs $X_2...X_N$, including the quadratic $X_2^2$, are all exogenous. I ...
1
vote
0answers
17 views

Is there any statistical problem on instrumental variable analysis with binary exposure and binary outcome?

I would like to conduct an instrumental variable (IV) analysis (a.k.a Mendelian Randomization analysis due to my IV is a genetic variant). In many cases as I searched before, an IV analysis was ...
0
votes
0answers
14 views

Comparing Demographics Of Observations Within Subgroups

I have a dataset of states with a variety of demographic characteristics of those states, as well as those states assigned to a geographic region (note that the first column is "fips", just that the ...
1
vote
1answer
32 views

What statistical methods would be recommended

What types of statistical analysis should I use to questions like: 1st question. Have you had problems standing for longer than 30 min? possible answers: no problems - had to adjust to be able - ...
0
votes
0answers
25 views

Implementation of quantile ARDL in R, EViews or Stata

I am working on time series analysis. I have squared returns as dependent variable. I want to regress it for knowing its causes. I have long T and small N data. I am looking for Quantile ARDL ...
1
vote
1answer
27 views

What is the difference between lsmeans in R and margins in Stata?

Context: I am using Stata to recreate someone else's analysis which was done in R. In Stata I have used the margins command to calculate the average adjusted predictions for a logistic model. I ...
1
vote
0answers
12 views

Is there any problem to conduct instrumental variables analysis with binary endogenous variable and binary outcome?

I would like to introduce "instrumental variables" in my study. In many cases, the outcome (dependent variable; DV) is a continuous variable. However, my study design has binary outcome (DV) and ...
1
vote
0answers
7 views

Choice of model for prognostic value of asymptomatic recurrence detection

I am involved in the final step of a project that evaluates the prognostic value of asymptomatic vs. symptomatic recurrence detection; all subjects experienced recurrence. The project proposed a ...
1
vote
0answers
37 views

Correct autocorrelation when using reg3 in Stata

I'm running a simultaneous equation model (three equations) on a time series dataset using reg3 in Stata. Some colleagues are concerned that the problem of ...
0
votes
0answers
32 views

Panel Data and Prediction/Forecasting

I have balanced panel data for around 130 countries, over three years. I ran a fixed effects regression using 'country' as my panel variable, and adding dummies for 'year'. I want to forecast the ...
1
vote
0answers
15 views

Deriving predicted probabilities from gologit2 (proportional odds models) output

I am trying to understand the output from Richard Williams's amazing gologit2 STATA package. The software is used for ordinal logistic regression and circumvents violations of the proportional odds ...
1
vote
0answers
30 views

marginsplot Stata: how to show MERs for categorical variables horizontally instead of vertically? [closed]

I ran an mlogit model in Stata. I then asked for the average marginal effects at representative values and now I would like to represent them in a graph. I have a ...
2
votes
1answer
83 views

Convert normal random variable into beta random variable in STATA

I need to generate two random variables - lognormal and beta distributed - while ensuring that the correlation between the two variables is -0.3. I generated two normal random variables with -0.3 ...
0
votes
1answer
122 views

propensity score matching with difference-in-differences for panel data

Research design utilizes companies that switched auditors (TREATMENT) and propensity score matched (PSM) companies that did not change their auditor (CONTROL). To obtain the propensity score for each ...
1
vote
0answers
10 views

Multiple Stage Hurdle Model Analyses

I have a dilemma over the application of double hurdle model. Here is a description of the data that I want to analyze: 1. Binary info on household purchase of different milk products 2. If ...
0
votes
0answers
24 views

Differences between Stata svy and R survey

I'm trying to replicate example 5.7 in Applied Survey Data Analysis (2nd edn). The text example is in Stata and I'm trying to replicate in R. With my svydesign object, I get exactly the same results ...
-1
votes
1answer
13 views

Concatenating distinct values contained within a string [closed]

I have a string variable (drugs) that contains a list of drugs prescribed at each line of treatment. I'm looking to create a new string that contains only the unique drugs from each line. In the ...
0
votes
0answers
29 views

Using B-coefficients from logit in a linear prediction equation (Stata 13)

This is probably basic, but the answer has eluded me so far... In Stata, if one runs the logit command, coefficient values are given. For the variables with p-...
0
votes
1answer
30 views
0
votes
0answers
27 views

Missing data in Stata

I have a GARCH time-series dataset of 5217 observations, spanning roughly 20 years. One of the variables, the trade-weighted US dollar index, misses 108 values, and as far as I can tell completely ...
1
vote
0answers
26 views

Full information maximum likelihood (Stata)

i have a (relatively complex) likelihood function that i would like to use to estimate my parameter coefficients. i have a data set with 412 observations for 19 variables. I'm fairly new to Stata, ...
1
vote
0answers
22 views

manually create categorical variable instead of fitting an interaction term

I am running a logistic regression model and I want to fit an interaction term between a dummy (female) and a categorical variable (risk level; 0/1/2). I was wondering whether creating my variable ...
0
votes
0answers
28 views

Bayesian logistic regression with priors from previous experiments (in Stata)

I am new to the world of Bayesian statistics - so I apologize in advance if my question is very basic. I've been looking for an answer a for a few days with no success. In short: Optimally, I would ...
2
votes
0answers
12 views

How to treat different status quo groups in a choice experiment?

I have a choice experiment where respondents choose between a status quo and one alternative. Before the choice questions, respondents are allocated to four different groups which determine the levels ...
0
votes
1answer
236 views

Clustered standard errors are completely different in R than in STATA

I'm trying to reproduce a study in R. Here are its core elements: study wants to measure the effect of a transit strike on highway delay independent variables: strike: binary dateresidual: ...
0
votes
0answers
33 views

Regression with varying weights within fixed effect units

I'm running a regression where within the fixed effect groups, the weights are not constant. However, since there are many fixed effects, I would like to use an estimation method as implemented for ...
2
votes
1answer
22 views

Are analytical derivatives unambiguously superior to numerical derivatives in GMM?

I am estimating a non-linear GMM model. In both Stata and R, you need to specify the moment equations and the instruments, but there is no need need to provide analytical derivatives for the estimator ...
0
votes
0answers
19 views

Analysing change over time

I have a panel data set with 5 ways. I'm working with the dependent variable X and the independent variables X1, X2 and X3. I'm interested in only the change of my variables on an individual level: E....
0
votes
0answers
17 views

Group variable in rank-ordered logistic regression

I used rank-ordered logistic regression in State for running analysis. I have 180 competitions. in each competition there are different teams competed with each other and they have ranks. Therefore, ...
1
vote
0answers
36 views

Diff-in-diff: Individual outcomes and group-level treatment

Question: What are my best options for handling group-level correlations in a panel differences-in-differences model using StataSE 14.2? Background: I have a Differences-in-Differences (DiD) design ...
0
votes
0answers
7 views

Comparing two KM estimates outputs without raw data

Some raw data has gone missing, but I have the outputs of two KM curves - Both their survival estimates and patients at risk. Is there any way for me to use just the estimates to test the difference ...
0
votes
0answers
45 views

Fixed Effects for fractual response variable with many zero observations

I am investigating the impact of some independent variables on educational expenditure shares, which is given as the proportion of $\frac{educational\_expenditure_i}{total\_expenditures_i}$. The ...
0
votes
0answers
102 views

Anyone familiar with Tobit panel models w/ random effects (and Stata's xttobit and metobit)?

I am not an expert when it comes to econometrics but I find myself in need of carrying out an empirical analysis. My question pertains to how exactly I might (or should) go about specifying the random ...
2
votes
0answers
11 views

Configuring survey design for multilevel modeling with National Inpatient Sample

I am a researcher looking to use multilevel mixed-effects models in Stata 14 to analyze the National Inpatient Sample. I am aware that the typical way that you configure the NIS' survey design for ...
2
votes
0answers
29 views

Looking at trend in count data

I have a clinic dataset with count data collected on a monthly basis from January 2013 - May 2018. There are 20+ variables. Almost all of them are "number of patients who accepted xyz treatment" in [...
1
vote
1answer
33 views

OLS and Probit possible on large sample enough?

I think I understood that normality of residuals may not be a problem if the sample is large enough (cf, here). My question is: Would my sample be large enough to be analysed using a probit and an ...
2
votes
1answer
139 views

Testing for significant difference between coefficients from 2 different IV regressions (Stata or in general)

I'm running two different IV models in Stata that share the same DV and controls but have different instruments for the independent variable of interest. ...
0
votes
1answer
35 views

Good way to visualize (multiple-layer) within variation of panel data

Now I have a panel data set that contains information of the land supply quota of Chinese cities. What I want to verify is whether the variation (of quotas) among different cities within a province is ...
0
votes
0answers
26 views

Any efficient way to solve the problem of panel regression' coefficient become insignificant

This is my very first time to post my question in this forum, so let me go straight my problem. In my research project, I am examining the impact of temperature and precipitation on growths of per ...
2
votes
0answers
29 views

Which duration model to use with a fully right censored database

Currently I'm examining the duration of residence of households. I have a database at my disposal that indicates how long a specific household resides in its current home. I want to explain their ...
2
votes
1answer
62 views

R/Stata Can I include a categorical variable in a Logistic regression when one of its values perfectly predicts one of the outcomes?

Suppose I have the following data df = data.table('y'= c(1,1,1,1,1,1,1,0,0,0,0), 'x' = c(1,1,1,1,1,1,1,1,1,0,0)) where x = 0 perfectly predicts y = 0. I ...
0
votes
0answers
172 views

Confidence Interval Upper and Lower Bound

As confidence interval says "95% confidence interval indicates that 19 out of 20 samples (95%) from the same population will produce confidence intervalS that contain population parameter.It means the ...
1
vote
0answers
10 views

What weight and how to use it for a 3 country analysis using the EWCS in Stata?

I'm fairly new to weights because the databases I used previously were not samples but actual populations I wanted to study, so apologies if all of this sounds very noobish. The way I understand it, ...