I want to sum the column 'stat1' by the column 'Group' if it has a certain value, such as Group == 'AAA'
...
Announcement
Collapse
No announcement yet.
500 results in 0.0176 seconds.
data
x
You can also choose from the popular tags.

Moaiz Siddiqui started a topic Do sum of all corresponding values in one column when other column has a certain valuein GeneralDo sum of all corresponding values in one column when other column has a certain value
Last edited by Moaiz Siddiqui; Yesterday, 04:23.
 4 posts

Activate and deactivate commands in a loop
Hi all,
I have the following for loop:
Code:set more off local recall "dummy_1 dummy_2 dummy_3 dummy_4"
 3 posts

cond() function
Hi all!
I have the following dilemma. I would like to create variables such that: if a local takes on a certain name (i.e. price) the variable
Last edited by Federico Nutarelli; 11 Nov 2019, 03:33.
 7 posts

Oswa Shafei started a topic Choosing the highest value of a variable in each category corresponding to another variablein GeneralChoosing the highest value of a variable in each category corresponding to another variable
Hello all,
I have Var1, which is postal codes, and Var2, dissemination area codes, for which there are multiple dissemination areas assigned to...
 2 posts

Loop does not work
Hi Statalist,
I have the following problem. I am running the nested loop below in which basically I have 3 nested loops: the principal for...
 4 posts

Looping through different databases
Hi guys,
I would like to make a loop that includes several different variables for different databases. Let's say I have DB1, DB2, DB3 corresponding...
 2 posts

Panel data set with spaced time periods
Hello Statalist,
I am currently analyzing a panel data set of 45 firms across 3 years. However, the 3 years are spaced, that is; 2007, 2013...
 2 posts

XTDATA and MISSING
Hi all,
is there a way to prevent xtdata command not to ignore missing values, or better, to avoid xtdata to transform just the values that...
 3 posts

correlation and proportional weights
Hello,
I am not able to use proportional weights with correlation but can use analytical weights.
Can anyone help me to explain the reason?...
 1 post

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:...
 1 post

Variance of each single residual
Hi Statlist,
I am struggling into constructing the residuals' specific variance for the following model:
Code:xtreg tasso_crescita_sales_prod
Last edited by Federico Nutarelli; 30 Oct 2019, 04:43.
 4 posts

Generating a new variable
I am working with playbyplay data on the NFL.
In my dataset, I have a variable named GameID, a unique identifier for every game, a variable...
 2 posts

Collapse by what?
Hi everyone,
I have the following database which I describe quickly. Basically it is a escalation of each Year according to a certain criterion...
 2 posts

Meta Command for prevalences
I'm trying to run a metaanalysis using the metan command for a rate of the progression outcome variable (events/100,000 people/year). I'd need help with...
 1 post

Rescaling Time
Hi Statlist,
I have the following problem. I have a panel dataset of the form:
Code:* Example generated by dataex. To install:
Last edited by Federico Nutarelli; 28 Oct 2019, 05:55.
 14 posts