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

using foreach, forvalues

Can I use loops command about these? recode v11 (1/9=1) (else =.), generate(hmember_1) recode v14 (1/9=1) (else =.), generate(hmember_2) recode v17 (1/9=1) (else =.), generate(hmember_3) recode v20...

View Article


Graphing a continous-by-continous interaction term using marginsplot

Dear Statlist, My study is about how city attachment (placeattatch) and city attractiveness (attractivecultur) interplays in influencing donation intention (DV; willtodonate_continue). All variables...

View Article


t-test confusion in significant meaning and conceptual framework

When reading a paper of Fan, 2021, I found two things that I feel it is strange They conducted a t-test and they argue the results as below Array Simply speaking, Econ, Soci, Ecol, and Util are four...

View Article

Count how many times an individual lies in the same cluster as another one

Hi all, I have a database that comprises cities divided into clusters for each year. In other words, I applied a community detection algorithm for different databases containing cities in different...

View Article

Summary statistics excluding observations already used

Hi there, I'm writing a research project about how profitability responds to a CEO pay cut. I therefore look at observations that have a pay cut (more than 25% decrease in pay cuy YoY) and take the 5...

View Article


Create table which counts the number of people within a certain category for...

Hi, I'm new to stata and I want to create a table, which counts the number of people within certain age groups for different variables (e.g. sex, employment, etc.). The result should look something...

View Article

Problem with coding

I have tried running the Stata code but keep getting a error message "( is not a valid command name". please, what could be the problem?

View Article

Clean regression output with indicator for controls

Hello everyone, I was wondering what the code would be to get one of those concise multiple regression outputs that that we see in the published papers. To be more specific, the kind which has your...

View Article


Variables are perfectly predicted the outcome

Hello guys, I attached my LOGIT result. My results failed. Because I had variables that perfectly predicted the outcome, I move to -firthlogit- But -firthlogit- does not run, and takes too much time....

View Article


How to write loops in this case

Dear all, Consider the following data: clear input int index byte age 1010 26 1011 41 1020 28 1021 46 1030 32 1031 44 1040 27 1041 28 2010 49 2011 45 2020 25 2021 29 2030 25 2031 29 2040 49 2041 48...

View Article

Question about adding group-specific linear trend in regression

Hello Stata community, I would like to ask a practical question about how to add group-specific linear trend in regression. Normally we would just add c.year#i.group to allow different groups having...

View Article

Image may be NSFW.
Clik here to view.

Propensity score matching for a subsample

Hello, I am working on a Difference-in-Difference panel model with year and entity fixed effects studying banking regulation. I wanted to carry out propensity score matching as in the pre-treatment my...

View Article

Running a regression model where the observations' independent variables are...

I am curious about whether you can make statistical inferences when you have nested data, and the way your independent variable is measured makes it only comparable within its own group. For example,...

View Article


Regression model with FE/RE/Mixed Effects where your independent variable is...

I am curious about whether you can make statistical inferences when you have nested data, and the way your independent variable is measured makes it only comparable within its own group. For example,...

View Article

Using poisson regression to predict future counts and incidence rates

Hello all, I would like some help with the following. I have historic data on the counts of a particular procedure each year (1999-2020), for each age band (10-20, etc) and gender (binary). For these...

View Article


Help with xtdcce2, missing a lot of observations

Dear community, I have encountered an issue with xtdcce2 (xtdcce2 4 - 08.02.2023). I have a balanced panel dataset with N=116 and T=22, 2552 observations in total. Somehow, only 30 obs are used in the...

View Article

Interpreting fixed effects when panel identifier is a group variable

Dear Statalist members, I have a conceptual question regarding the use of xtreg, fe when the panel identifier id reflects a group variable [gen id=group(country firm)], thus the panel variable reflects...

View Article


File read limits.

Dear All, Stata's manual mentions that: fget(fh) is for reading text files; the next line from the file is returned, without end-of-line characters. (If the line is longer then 32,768 characters, the...

View Article

Is a ordered logit model possible?

First of all, thank you for reading. I have a question. As a dependent variable, we use the average of 8 questions measured on a 5-point scale, and used a ordered logit. However, using the average, we...

View Article

Saving tabstat as a matrix and calculate j-b value

Dear statalist: I am learning to obtain descriptive statistics of variables, but i don't know how to use matrix calculation to get j-b value. How can I get the j-b value of the three variables" price...

View Article
Browsing all 72767 articles
Browse latest View live


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