Quantcast
Channel: Statalist
Browsing all 65033 articles
Browse latest View live
↧

Egen calculation, means/sd

Hi everyone, I'm trying to manually calculate a value for each household in a survey. Using three dummy variables in the dataset (X, Y, Z), I'd like to generate a new variable that takes on the...

View Article


Creating normally distriuted random variable given mean and standard deviation

Hi all I would like to create a random variable (X) with 100 observations. The variable should follow the normal distribution with mean 15 and standard deviation 5. Can anybody suggest a code for this?...

View Article


Divide a matrix

Hello, How can I devide a matrix by an other matrix (not a division by scalar) ? By the way, I tried : mat xxx = zz * 1/yy , without résult... Thank you for your answer Marc

View Article

how to create a squared variable in Stata?

Hello folks, I have a age variable and I want to create its square. I would be very grateful if someone could explain me how can I do that. Thank you so much

View Article

How to run a quadratic OLS regression?

I have been asked to run a quadratic OLS regression. Do we have such a regression in STATA? I would be very grateful if someone could help me out.

View Article


Different heterogeneity statistics for proportions in the same subgroup using...

Hello, I am running meta-analysis for proportions and tried both -metan- vs -metaprop_one- for subgroup analysis as follows. -metaprop_one- used exact confidence limits for a binomial proportion. The...

View Article

tmap/smap USMAPS redundant lines

Dear Statalisters, Although I follow the precise instructions from Maurizio Pisati (one should sort boundary files by _ID, as suggested in p. 9 from...

View Article

Interaction term

Hello folks, I try to add an interaction term to my model but have no idea how to do that. I was wondering if someone could help me. Thank you so much

View Article


margins after mlogit beta coefficients

Dear Stata users, I am running a margins command after mlogit. But if I compare the beta-coefficience of mlogit with the dy/dx of margins they don't point in the same directions (different algebraic...

View Article


Error Message Convergence not achieved in etregress before iterations

I'm running etregress in Stata 14. It gives me a "convergence not achieved" message but that occurs before the iteration log. It also says "missing standard errors indicate some of the parameters are...

View Article

Storing Person-Specific Marginal Effects in a Variable?

Hi Statalist, I am trying to estimate person-specific marginal effects for a structural form equation, and I need a way to save the marginal effects that Stata creates for each person when you run the...

View Article

looping over dates with formating

I have a bunch of dates reflecting date of joining (DOJ). I want to do a bunch of calculations for each DOJ. Before getting into the calculations I want to display the date through which I am looping...

View Article

Fixed vs. random effects and year dummies

Hi all, I'm currently working on my dissertation using Stata and I'm a little confused. I'm looking to find the determinants of a firm's borrowing source. Regressing debt source/total debt against firm...

View Article


chi2 with clustered data

Hi, I want to calculate a chi2 using clustered data. My two example variables of interest are study timing (dichotomous variable 'timeat3nospan': 1=post-policy; 0=pre-policy) and race (four category...

View Article

Executing Mata syntax over several dataset

Hi all. I'm trying to execute a routine over several datasets however, it stops after the first year. The syntax is, local years 2003 2008 2015 foreach i of local years { cd...

View Article


Nhanes

New to statalist.org. Where can I find data dictionaries for importing NHANESIII ASCII public use data from http://www.cdc.gov/nchs/nhanes/nhanes3/data_files.htm? Have some been posted online?

View Article

Combining Variables Across Observations

Hello all, I wish to collapse(sum) all of the variables in 3 company-year observations with 3 company-year observations of another company in my dataset. I would like the second company to absorb the...

View Article


Simultaneous equation (reg3) and clustered standard errors

Hi everyone, Does anyone know how to obtain clustered standard errors when using reg3 or sureg? I've looked online and there doesn't seem to be a straightforward solution. Bootstrapping alone does not...

View Article

Simultaneous Equations (REG3) and Endogeneity Test Result(Hausman Test)

Hi All, I have following set of simultaneous equations: Y = X + A + B + C + D (1) X = Y + E + F + G + H (2) In above equations variables X and Y are endogenous variables. The variables F G and H are...

View Article

ADF-test. My data has a unit-root, now what?

Hello everyone, I have a monthly dataset, time-series, from about 1962 until 2008 where I want to regress the effect of several variables on the federal funds rate. It turns out however, when I perform...

View Article
Browsing all 65033 articles
Browse latest View live