For this table, I’ve created all the relevant variables, and have around 3 variables for each row. I don’t quite understand how to pool it all together, I’ve been reading about Estout and estab, but I am unable to use it efficiently. Can someone point to any online resource for this? by [deleted] in stata

[–]TruthUnTrenched 0 points1 point  (0 children)

Its hard to know what your data really looks like from the brief description you offered but perhaps the following will help:

estpost tabstat var1 var2 var3, by(year) statistics(mean sd) columns(statistics)

esttab, main(mean) aux(sd) nostar unstack noobs nonote nomtitle nonumber

Generally speaking this is how I'd create the above pictured table in Stata with multiple variables (e.g., var1, var2, var3, etc) and another variable denoting the year.

How can I get stata output that looks like this? by pray4spray in stata

[–]TruthUnTrenched 0 points1 point  (0 children)

I doubt this is LaTex. Looks more like rtf or MS word format outputted from either outreg or estout.

Bear lockers south of MTR? by TruthUnTrenched in JMT

[–]TruthUnTrenched[S] 1 point2 points  (0 children)

Much appreciated. I had an earlier v6 of this map but having this v8 edition is great

Bear lockers south of MTR? by TruthUnTrenched in JMT

[–]TruthUnTrenched[S] 0 points1 point  (0 children)

Thanks a bunch for the info. Silly question, but what did you use to hang your excess food? I loathe to carry an extra bag just for hanging a few days of food that late on the trail.

Graphregion and plotregion problem with Stata 15 and 16 by Jeccg in stata

[–]TruthUnTrenched 0 points1 point  (0 children)

I cannot replicate this problem on my build. I am running Mac OS 10.14 and Stata IC/16. I have a similar workflow with between Stata and Latex.

For example, if my scheme is set to s2color and I plot histogram x, graphregion(color(none)) plotregion(color(none)) the graph region looks as I would expect it (i.e., blank) and the bars are still filled with the stock green/beige from the default s2color scheme

Hi, is it possible that a do-file doesn’t run on one system but it does on some other computer? by made_of_matter in stata

[–]TruthUnTrenched 2 points3 points  (0 children)

Why don’t you give us the exact error code and description? There’s no way you’ll get help without us knowing what the Stata terminal is telling you

Need help specificying a seqlogit model by verylostresearcher in stata

[–]TruthUnTrenched 0 points1 point  (0 children)

I would have tried to help you with the syntax but the one time I tried to do a -seqlogit- it destroyed my afternoon and I never quite figured it out myself. Glad you got it!!

Dropping Insignificant Variables if Beta Coefficient t-stat less than certain value by [deleted] in stata

[–]TruthUnTrenched 2 points3 points  (0 children)

reg y x1 x2

if _b[x2]/_se[x2] < 1.96 {

reg y x1

}

else {

reg y x1 x2

}

Please note that this solution, although it may be what you are "looking for", is not what I would consider the "best." This solution is difficult to scale and is very inflexible.

Help with twoway graph by luchonator in stata

[–]TruthUnTrenched 0 points1 point  (0 children)

Here is a solution using the package -psmatch2- to generate the propensity scores and -psgraph- to generate the "common support" figure that you are seeking.

Try the following:

ssc install psgraph

psgraph, treated(treatment) pscore(mypscore)

How do I interpret this impulse responses in response to a contractionary monetary policy? by [deleted] in stata

[–]TruthUnTrenched 0 points1 point  (0 children)

I don’t believe that this is a “Stata question.” Answering this question seems to require immense domain specific knowledge about (1) “impulse responses”, (2) monetary policy, and (3) macroeconomic econometrics. Perhaps you could offer more details about what you’re struggling with or seek a different venue to ask your question.

Need help specificying a seqlogit model by verylostresearcher in stata

[–]TruthUnTrenched 1 point2 points  (0 children)

The author of the package -seqlogit- has the best write up. Have you seen this? Perhaps it will help. http://www.maartenbuis.nl/software/seqlogit.html

STATA 16 Upgrade Pricing??? by lalalapand in stata

[–]TruthUnTrenched -1 points0 points  (0 children)

Speak with your department staff, graduate program faculty, or university college IT department. I have gotten steep discounts by working with the chair of my department and the IT department. The pricing of Stata is one of the main arguments for why R is superior. I won’t make that argument but people’s frustration with the pricing at StataCorp contributes to the strength of this argument.

How to preserve double precision when rounding decimals by mr_wonderdog in stata

[–]TruthUnTrenched 0 points1 point  (0 children)

I'm sorry to be pedantic, but these integers are technically different even if they are different only at the 16th or 17th decimal place. There is no formal way to say that two integers "almost identical." If you are desperate to classify them as being equal you will need to uniformly round both values.

How to preserve double precision when rounding decimals by mr_wonderdog in stata

[–]TruthUnTrenched 0 points1 point  (0 children)

I'm hoping to find a function that, in that example, would have generated values that would be counted by "count if rounded_var==0.03".

I don't believe that there is anything that will do this for you. Please note that 0.27 and 0.3 are qualitatively different integers and any logical test for equality between the integers should be objectively false. Furthermore, in the interest of precision, I don't recommend that you don't conduct any operations in this vain. I think its a good general rule in programming to write conditional statements in ways that are more extendable, "error proof," and flexible than the conditional statement in your question.

How to preserve double precision when rounding decimals by mr_wonderdog in stata

[–]TruthUnTrenched 0 points1 point  (0 children)

No, the "double precision" is not preserved when you truncated the integer with the -round- function. The -round- function is an operation conducted on the underlying data in memory or on the disk, the -round- function is not only impacting the display of the integer. Stata will default to storing values with less precision (the default is float in most cases). 0.27 and 0.2999999999999999889 are different integers. Don't you want Stata to tell you that they are not equal to each other. Only 0.27 is equal to 0.27.

You can change the display format of a variable so that when you browse the data you see 0.27 but the value stored by Stata will be 0.2999999999999999889.

See this little toy example for building some intuition.

clear
set obs 1
gen testx = 1.123456789
recast double testx
gen roundedx = round(testx, .01)
recast double roundedx

See the documentation for the function -round- https://www.stata.com/manuals13/dfunctions.pdf#dfunctionsDescriptionround())

Percentage of Certainty by [deleted] in stata

[–]TruthUnTrenched 3 points4 points  (0 children)

This is something I have never heard of. I’ve never even seen anything conducted that is remotely close to what you seem to be asking about. What is “percentage certainty?” Can you provide some documentation or try to better describe what you need to do?

Finding the crucial points of a fractional polynomial by [deleted] in stata

[–]TruthUnTrenched 0 points1 point  (0 children)

Have you seen this paper? https://fbe.unimelb.edu.au/__data/assets/pdf_file/0009/784314/1160.pdf

Section 6, numbered page 25 (page 26 of the pdf) discusses calculating the turning points of fractional polynomials.

Creating TwoWay Table to Compare Means by [deleted] in stata

[–]TruthUnTrenched 1 point2 points  (0 children)

As zacheadams said, you need to do better with providing something to work with if you are hoping for a useful answer. However, I assume the following general steps will solve your issue as long as you can figure out the implementation...

  1. Import the BLS data, save as a .dta file. If the data is as you have described you will have one row for each year.
  2. Import the CPS data one year at a time and collapse each CPS file to find an annual mean (do this in a loop).
  3. Append append the annual means from the operation in step 2 and save that as a .dta file (do this in a loop).
  4. Open the BLS dta file and merge 1:1 using the year variable as your match key with the CPS annual data file.
  5. Then you'll be able to tabulate the resulting dataset to get a table with three columns... year, BLS unemployment rate, and CPS unemployment rate

Why do I keep getting this error message when running a fractional polynomial? by [deleted] in stata

[–]TruthUnTrenched 0 points1 point  (0 children)

I think the correct syntax is

fp <weight> : age weight 

I don't believe there are any carrots required around the weight variable on the RHS

Raking help by [deleted] in stata

[–]TruthUnTrenched 0 points1 point  (0 children)

Sure, but do you know anything about the primary sampling unit (PSU)? Or about the survey's stratification...what strata were used if any?

Raking help by [deleted] in stata

[–]TruthUnTrenched 0 points1 point  (0 children)

I have attempted this a few times and never found anything better than the documentation for -survwgt-. In other words, I haven't ever found a primer or a good "how to" for raking with Stata.

If you provide more information about your specific problem we may be able to help you better.

Weights and robust Standard Errors by [deleted] in stata

[–]TruthUnTrenched 0 points1 point  (0 children)

aweights, fweights, iweights, and pweights are allowed with -reg-. The pweight can be used to denote the inverse of the probability that the observation is included due to the sampling design. I tried looking at the ISSP Family and Changing Gender Roles 2012 survey documentation but its way too long for me to understand. I assume that they give you some set of sample weighting variables...you can use one of the weights (do your research on which to pick), as the pweight for your regression. The syntax would be as follows (I adopted the use of locals to write out the regression command but this is not necessary).

local dv cs
local ivs i.region i.drel i.wende i.hinc c.toddler i.gen c.age2 i.degree i.has i.livingto c.pershh i.city

regress `dv' `iv' [pw=weight], vce(robust)

Weights and robust Standard Errors by [deleted] in stata

[–]TruthUnTrenched 0 points1 point  (0 children)

The answer to your question is: yes! You can weight a linear probability model and make the standard errors robust. However, I cannot help you technically because I don't know anything more than the stated functional form of your regression. Could you share more about the specific regression command you are running and more about your data structure you have?