Quantcast
Channel: The Stata Blog - Latest Comments
Viewing all 1128 articles
Browse latest View live

Re: Web scraping NFL data into Stata

$
0
0

You must specify the season() option to remove duplicate names for each year. For example, to use this years stats you would type:

nfl2stata player quarterback, season(2018) seasontype(reg) clear
graph bar (asis) yards if yards > 500, exclude0 ///
over(name, sort(yards) descending label(angle(forty_five) labsize(small))) ///
blabel(bar) title(2018 Passing Yard Leaders)


Re: Export tabulation results to Excel—Update

Re: Export tabulation results to Excel—Update

$
0
0

This seems like a very useful command, but after installing it w/ Stata 15.1 and running it, Stata does not recognize the command tab2x1 - any idea why the bug? I must be missing something

Re: Export tabulation results to Excel—Update

$
0
0

I believe you need to use the command tab2xl not tab2x1 (not the number 1 but the letter L).

Re: Web scraping NFL data into Stata

$
0
0

Is there a more comprehensive set of documentation on all the commands and arguments somewhere?

Re: Web scraping NFL data into Stata

$
0
0

When you download the command type help nfl2stata in your Stata Command window to see the full documentation for the command

Re: Web scraping NFL data into Stata

$
0
0

this is a great option. Is it possible to get a similar command for the NBA?

Re: Web scraping NFL data into Stata


Re: Export tables to Excel

$
0
0

Has anyone tried copy table & paste in excel? I feel it is the easiest way to do this.

Re: Nonparametric regression: Like parametric regression, but not

$
0
0

Hi everyone,
I followed the (very useful) instructions here but I'm confused regarding one thing. I have a binary treatment T and a continuous covariate X. I'm interested in how the treatment effect of T on my outcome Y varies over the distribution of X. Hence, I'm estimating: - npregress kernel Y T X -
As dicussed in the blog post now I have two options to visualise the treatment effect heterogeneity:
Option A:
- margins i.T, at(X=(-2(0.5)2)) -
- marginsplot -
Option B:
- margins, dydx(T) at(X=(-2(0.5)2)) -
- marginsplot -
In my understanding they should give the exact same result just visualised differently: Option A plots the predicted Y as a function of X once for T==1 and once for T==0, while Option B directly plots the difference between the prediction for T==1 and T==0 as a function of X (because T is binary and hence the derivative dydx is just the difference).
However, in my case they differ! Option A shows that the difference between E(Y|T==1,X) and E(Y|T==0,X) is decreasing with X, while Option B shows the opposite...!!! Can anybody explain what is going on here? For Option B I get basically something linear, it's just an increasing straight line, so it seems the dydx option imposes a constant effect over X or something the like, but I don't find anything like that in the description of the command.
Help is greatly appreciated! Thanks!

Re: Scheming your way to your favorite graph style

$
0
0

Just want to shamelessly plug -brewscheme- which is designed to make it easier for users to generate schemes, add customized names colors, proof their graphs for clarity across color sight impairments, and more.

Project page:
https://wbuchanan.github.io...

Project repository:
https://github.com/wbuchana...

Comments, suggestions, ideas, and collaborators are all welcome.

Re: Scheming your way to your favorite graph style

$
0
0

Is there a proper/preferred way to handle alpha transparency in schemes for Stata 15? If so, can you provide some examples of scheme entries that modify alpha transparency?

Re: Importing Twitter data into Stata

$
0
0

I ran into the same issue. I'm using a do file that's worked well in the past and all of the sudden am getting this same error after setaccess. I ran the commands listed and get:

. net install twitter2stata, replace
checking twitter2stata consistency and verifying not already installed...
all files already exist and are up to date.

. which twitter2stata.ado
/Users/abbykinch/Library/Application Support/Stata/ado/plus/t/twitter2stata.ado
*! version 1.0.4 13dec2017

. which twitter2stata-1.0.4.jar
/Users/abbykinch/Library/Application Support/Stata/ado/plus/jar/twitter2stata-1.0.4.jar

So I'm not sure what's wrong. Any help would be awesome.

Re: How to automate common tasks

Re: Importing Twitter data into Stata

$
0
0

Make sure Stata is up-to-date. Type update all in your Stata Command window to update Stata.


Re: Web scraping NBA data into Stata

Re: Estimating the parameters of DSGE models

$
0
0

David, I have followed the command you used but I keep receiving error messages as follows. Kindly help me with the do-file.
Thanks Eric

. dsge (p = {alpha}*E(F.r) + e)
syntax error
equation invalid
r(198);

. (r = {beta}*ip + m )
is not a valid command name
r(199);

. (F.m = {rho}*m, state)
is not a valid command name
r(199);

. (F.e = {theta1}*e + {theta2}*Le, state)
is not a valid command name
r(199);

. (F.Le = e, state noshock), nolog
is not a valid command name
r(199);

Re: Web scraping NFL data into Stata

$
0
0

How to find 5 year rolling correlation between two time series variables.
My data starts from from first quareter of 1996 to 2nd quarter of 2018(both dates included).

Which command do I need to use to perform this anlaysis.

Re: Comments are now open!

$
0
0

How to find rolling correlation between two time series variables.
My data starts from from first quareter of 1996 to 2nd quarter of 2018(both dates included).

Which command do I need to use to perform this anlaysis.

Re: Understanding matrices intuitively, part 1

Viewing all 1128 articles
Browse latest View live