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

Creating table where avg return for each portfolio in each year is given

Dear stata users, I am quite new in Stata and struggeling with some codes. I want to find out if there is a correlation between the goodwill within a company and its returns. I calculated the monthly...

View Article


Referencing outside data set to generate new variables

I've generated a data set (call this percentile.dta) that connect test scores to percentiles depending on the year and test type. I'm left with 5 variables: score, test1_percentile, test2_percentile,...

View Article


Can stata do reduced rank regression analysis?

Hello everybody, Has someone any experiences doing reduced rank regressions with stata? A colleague of mine will have to use this as a main analysis type and so far only found solutions for SAS. Thank...

View Article

Help on creating a new variable

'Create a variable which gives you the change in price from the 1st to 2nd period of a combination' can anyone help? message me if you would like more background would really appreciate it

View Article

Panel structure with repeated time values: problem with xtset

Dear All, I am working with a dataset of tweets by politicians. For each tweet, some dummy variables - such as "inequality" and "migration" in the example below - are equal to 1 if that particular...

View Article


Handling time and date

Dear all, I'm very new to Stata, I'm more used to SPSS. I need to define missing values for time variable, but no matter what I try it doesn't work, and I can't seem to find answers in any material....

View Article

Access 95%CI after using svy: mean variables, over(group)

Hi, I'm working with a dataset that uses some fancy survey sampling design, which I think I've finally understood. After using the svy-commands, and so on, I want to find the means and 95% CI of the...

View Article

Reshaping cross sections to panel data

Dear Ms./Mr., I need your help urgently in converting the following data set from 1980-1999, X_Country1 Y_Country1 X_Country2 Y_Country2 X_Country3 Y_Country3 and I am asked to pool it and run...

View Article


Tweaking 1st stage of 3SLS

I am trying to estimate following two simultaneous equations using 3SLS: y1 = x1 x2 y2 = y1 y1*x1 x1 x3 (where y1*x1 is an interaction term; it is the variable of interest) My problem is 1st stage...

View Article


program end leads to stata breaking?

Hi Statalist, I am having difficulty fixing this particular (probably syntactic?) error and would appreciate another pair of eyes looking at it. I want to define a program inside a forvalues loop. I've...

View Article

Is margins the correct approach?

Hi all, A colleague and I are attempting to determine whether an analysis we'd like to accomplish is done so using the margins command. They write: "Back in my graduate school days, I *think* I...

View Article

How to check if I have duplicates without perfectly duplicated obs

Dear All, I am a long data, with duplicated IDs, as there are obs for different dates. I would like to check if there are difference between the variables for each ID and Date (as my title say:...

View Article

Adding a plot of means to a twoway graph.

Dear All, I want to plot a twoway graph that includes both, linear fit with confidence intervals and the annual means (connected with a line). My data is an annual panel: Code: * Example generated by...

View Article


margins command

hi, Probit model as school enroll is a binary variable. Height for age is a continuous var. schoolenroll=male+heightforagezscore+(heightforage *male) i want the effect of height of girls vs boys on the...

View Article

Shading Graphs - Area Plot Tapered

Hello, I am trying to plot a trend line with recessionary periods shaded in grey. Prior posts on this forum address the methods of shading graphs (e.g.,...

View Article


Fuzzy merge between two datasets, using jarowinkler distance

Hi, I have one dataset that contains information about the full name (two names, two surnames) of 200.000 persons, approximately. This (string) information is not of high quality, in the sense that...

View Article

Specification curve

FYI: Hans Sievertsen has released on demo program to create a specification curve on GitHub. In the example below, the graph displays 72 robustness checks. https://github.com/hhsievertsen/speccurve...

View Article


Estimate of mean squared error

Hello, Is there a Stata written command that allows one to determine the mean squared error from a mixed-effects linear regression model? I want to estimate this quantity for a simulation analysis that...

View Article

Batistical Analysis

Happy Halloween Code: cap preserve drop _all set seed 7 set obs 15 g y=uniform() g x=uniform() g m="🦇" tw sc y x, graphr(c(purple)) plotr(c(black)) msy(i) mla(m) mlabp(0) mlabs(*15) ysc(r(-.2 1.2))...

View Article

Weighting by how often something shows up

I am trying to weight areas of a twoway scatter by how frequent they show up. For instance scatter var1 var2 Say I have many observations that show up at the point (1,1) on my scatter plot, but not...

View Article
Browsing all 73262 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>