BJ Data Tech Solution

Specialized on Data processing, Data management Implementation plan, Data Collection tools - electronic and paper base, Data cleaning specifications, Data extraction, Data transformation, Data load, Analytical Datasets, and Data analysis. BJ Data Tech Solutions teaches on design and developing Electronic Data Collection Tools using CSPro, and STATA commands for data manipulation. Setting up Data Management systems using modern data technologies such as Relational Databases, C#, PHP and Android.

  • Home
  • Data Management
  • Data Analysis
  • Data Collection Tools Tips
trend over years for categorical variable

trend over years for categorical variable

Wednesday, November 30, 2022 Data Cleaning Data management Data Processing
Hi I am doing repeat cross sectional analysis over 10 years (discharge_year) for of a categorical measure (oc_mix) which have 3 categories(w...
how to create the start and end date for a year

how to create the start and end date for a year

3:24 PM Data Cleaning Data management Data Processing
Dear statalist, This might be an easy question, but I didn't figure out how to do this. Say I have a set of years, 2010, 2014, 2015, 2...
Perform a paired ttest on two substracts of the same variable

Perform a paired ttest on two substracts of the same variable

1:26 PM Data Cleaning Data management Data Processing
I have a dataset that looks like this: var1 var2 var3 attribute 1 0.93 0.88 1 1 0.76 0.20 1 1 0.40 0.18 0 0 0.3...
OLS Regression - explanation of coefficients with control variables

OLS Regression - explanation of coefficients with control variables

4:33 AM Data Cleaning Data management Data Processing
Good morning, I´m doing an OLS regression with the dependent variable having a health number ( Code: Health_Number - a dummy variable t...
How to write this with a loop (repetitive coding with numerical values that do not follow each other)

How to write this with a loop (repetitive coding with numerical values that do not follow each other)

3:28 AM Data Cleaning Data management Data Processing
Hello everyone, How can I write this faster? Code: svy: prop rech if form1==2 & gan1==14 svy: prop rech if form1==2 & ...
Two way graph with multiple lines in a loop

Two way graph with multiple lines in a loop

1:31 AM Data Cleaning Data management Data Processing
Hello everyone, Iam trying to do a graph of multiple lines. What I want is a graph that shows in a same graph diffmain, diff4,diff5,diff21 a...
using newey west for heteroskedasticity and autocorrelation in vecm

using newey west for heteroskedasticity and autocorrelation in vecm

12:28 AM Data Cleaning Data management Data Processing
So, I am trying to run a regression that requires me to log and take the first differences of it to render stationary. That is why I am usin...
creating a dummy variable based on percentage

creating a dummy variable based on percentage

Tuesday, November 29, 2022 Data Cleaning Data management Data Processing
In the following sample dataset the house election result in United States are given from 2002-2020. Candidatevotes indicate the person who...
local macro text with line break

local macro text with line break

1:40 PM Data Cleaning Data management Data Processing
Hi there Does anyone know if there is a way to spread the text contents of a local macro across multiple lines? Code: local lines ...
Editing graph with a TIFF file

Editing graph with a TIFF file

3:23 AM Data Cleaning Data management Data Processing
Hi everyone, Trying to find out if there's a way for me to edit my graph using stata's graph editor with just the TIF file. The gr...
pweight with melogit

pweight with melogit

2:23 AM Data Cleaning Data management Data Processing
I have a Panel dataset with 260,647 data points consisting of 260,647 Respondents within 43,400 households and between 1 and 11 survey waves...
Formal tests of volatility in STATA17

Formal tests of volatility in STATA17

Monday, November 28, 2022 Data Cleaning Data management Data Processing
Dear Statlist: I have longitudinal data on employee data across multiple years and organizations. I've been making a series of line gr...
Color changes with PNG export.

Color changes with PNG export.

6:23 PM Data Cleaning Data management Data Processing
On the left, we have the graph I actually want (ignore please the slight transparency difference between legend and data colors). On the rig...
Generating the "opposing" variable in a long dataset

Generating the "opposing" variable in a long dataset

6:23 PM Data Cleaning Data management Data Processing
Hi all, I am using Stata 17/SE on Mac and I am having trouble generating a variable using another observation within a group. For contex...
convert string yyyy-mm-dd hh:mm:ss to %td format

convert string yyyy-mm-dd hh:mm:ss to %td format

4:23 PM Data Cleaning Data management Data Processing
Hello, As the title of this question suggests, I have a set of data with variable "Qtm" in string format, e.g., 2010-01-07 19:16...
Stata command for weighted M-estimator.

Stata command for weighted M-estimator.

2:23 PM Data Cleaning Data management Data Processing
Dear all, Does Stata has commands or packages that can estimate parameters for weighted M-estimators? For example, how to estimate beta wi...
double-hurdle model not feasible

double-hurdle model not feasible

1:23 PM Data Cleaning Data management Data Processing
Hi, I'm using a panel double-hurdle model using Code: xtdhreg command. But I get the following error: Code: Obtaining starting ...
How I find the wrong data?

How I find the wrong data?

2:23 AM Data Cleaning Data management Data Processing
Dear Statalist, I have the note: multiple positive outcomes within groups encountered, followed by clogit Y asc fish_d2 fish_d3 vet_d2 vet...
Create Twoway Line Graph Forcing Gaps for Missing Periods

Create Twoway Line Graph Forcing Gaps for Missing Periods

2:23 AM Data Cleaning Data management Data Processing
Hi all, My data: Code: input float(Datum_n total_unem_bymonth sum_newpositions_bymonth) 723 148245 2261 724 150673 4089 725 144790 85...
Treatment Variation Plot

Treatment Variation Plot

12:23 AM Data Cleaning Data management Data Processing
Hello Statalist! I was wondering if it would be possible for Stata to plot this kind of variation figure. This figure shows how the treat...
Create a matrix or data set from current variables in stata

Create a matrix or data set from current variables in stata

Sunday, November 27, 2022 Data Cleaning Data management Data Processing
Hi everyone! I have a dataset with three variables: province_code (11 province codes), newnsector (14 sector codes) , r_output. In my Sata...
Reshape data

Reshape data

6:23 PM Data Cleaning Data management Data Processing
Hi I have the following data having following variables lat level lon time air dup time2. The level variables takes only two values 1000 ...
Loop with a synthetic control method

Loop with a synthetic control method

5:23 PM Data Cleaning Data management Data Processing
Hi everyone, I have a dataset at the state level with 39 states and I want to do a synthetic control regression (as shown) only for the st...
Method deriving weight of second level for mtobit model

Method deriving weight of second level for mtobit model

4:23 PM Data Cleaning Data management Data Processing
I would like to analyse my data in the multi-level Tobit method (metobit) with applying two-level weights. In multi-level linear mixed model...
Leading zero

Leading zero

2:23 AM Data Cleaning Data management Data Processing
Hi statalist community, Code: * Example generated by -dataex-. For more info, type help dataex clear input RTR 1 2 3 4 5 6 7 8 9 10 11...
Multiple random slopes in a mixed linear model

Multiple random slopes in a mixed linear model

12:23 AM Data Cleaning Data management Data Processing
Dear all, I have unbalanced panel data with repeated sampling over 6 years, hence I am employing mixed linear regressions. I want to incor...
Optimal lag selection in Granger Causality tests

Optimal lag selection in Granger Causality tests

Saturday, November 26, 2022 Data Cleaning Data management Data Processing
I use [TS] varsoc to obtain the optimum lag length for the Granger causality test. This command reports the optimal number of lags based on ...
Main effects of two independent variables across five groups

Main effects of two independent variables across five groups

5:23 PM Data Cleaning Data management Data Processing
Hi, I have unbalanced panel data for 160 companies from 5 different subgroups (g1,g2,g3,g4,g5) where group id is defined by business activ...
How to draw overlayed coefplot with only one regression

How to draw overlayed coefplot with only one regression

4:23 PM Data Cleaning Data management Data Processing
Suppose I have ran the following regression reg wage i.year#i.gender controls where gender takes two values. What I want is to use coef su...
Duplicate row*

Duplicate row*

3:23 PM Data Cleaning Data management Data Processing
Hi how once can check the duplicate row in the stata please
Formatted IQR using Collect

Formatted IQR using Collect

3:23 AM Data Cleaning Data management Data Processing
Hi, I am using the excellent Example 3 in the "Stata Customizable Tables" manual to help me build a table with frequency (percen...
About Foreach or Forvalue

About Foreach or Forvalue

1:23 AM Data Cleaning Data management Data Processing
Hi! I am trying to create seven summary variables named den_1 to den_7 to simplify the results I have from 34 variables named total1-total34...
GLM binomial logit model gof - Deviance

GLM binomial logit model gof - Deviance

Friday, November 25, 2022 Data Cleaning Data management Data Processing
Good day, I'm using Stata 16 and trying to do gof for a glm logit model but the results show a lot of missing data. My commands are as...
Help: weights not allowed r(101)

Help: weights not allowed r(101)

8:23 PM Data Cleaning Data management Data Processing
Hi! I met a mistake in following command: egen x2 = group(sex re age educ) gen wm = sex == 1 & re == 1 egen wminc = mean(incwage) ...
Estimating latent class models in Stata using both categorical and continuous indicator variables

Estimating latent class models in Stata using both categorical and continuous indicator variables

3:23 PM Data Cleaning Data management Data Processing
Hi Statalist community, I am trying to run latent class models and I am fairly new to this type of analysis. I have continuous and categor...
xtivreg2: endogeneity and overidentification

xtivreg2: endogeneity and overidentification

2:23 PM Data Cleaning Data management Data Processing
Hello everyone, I have an issue with interpret the result of xtivreg2: - Overidentification is significant - Endogeneity test is not sign...
Household Fixed Effect

Household Fixed Effect

6:23 AM Data Cleaning Data management Data Processing
Hello, Is there an issue with using HH fixed effects or individual fixed effects when the death of a family member is the treatment in a DI...
Problems with command "etable"

Problems with command "etable"

2:23 AM Data Cleaning Data management Data Processing
Hi there, My intention is to run "etable" to create a results table of two models. My code is: [ATTACH=CONFIG]temp_29317_166...
Which test should i use on Stata ?

Which test should i use on Stata ?

1:23 AM Data Cleaning Data management Data Processing
Hello, I would like to know which test to use on Stata according to my configuration. So I want to compare 3 ways to collect data So I...
Understanding type of panel

Understanding type of panel

Thursday, November 24, 2022 Data Cleaning Data management Data Processing
Hi everyone, I have individual level data for 20 regions for 18 years. The question is to examine the impact of x on y (binary variable). ...
How to calculate days and hours between two dates

How to calculate days and hours between two dates

4:23 PM Data Cleaning Data management Data Processing
Hi, I am calculating days and hours between two dates (admission date/time and discharge date/time), thanks for any suggestions. Example...
Problem of missing observations in CAPM estimation

Problem of missing observations in CAPM estimation

5:23 AM Data Cleaning Data management Data Processing
I have following variables from raw data and I want to estimate the return of Stock PG using CAPM model. I found that there are a lot of mis...
egen for numeric variables

egen for numeric variables

5:23 AM Data Cleaning Data management Data Processing
Hi, I'm trying to concat two numeric variables whit the egen command, I know when it is used a string variable results, but, when I try ...
DiD

DiD

4:23 AM Data Cleaning Data management Data Processing
Dear All, I have ran into several general issues whilst starting to work with DiD. The data that I have is repeated cross-sections with 1...
Variable not recognized after modification

Variable not recognized after modification

4:23 AM Data Cleaning Data management Data Processing
Hi everyone, For company data analysis for my thesis, I wanted to create industry dummy variables based on the company's SIC Code 2...
Unable to report & understand relogit marginal effects

Unable to report & understand relogit marginal effects

1:23 AM Data Cleaning Data management Data Processing
Dear all, In my (regression) analysis I am trying to see when companies are more likely to demand aid from governments, considering 5 majo...
Rearranging columns and rows to make it country-level database

Rearranging columns and rows to make it country-level database

Wednesday, November 23, 2022 Data Cleaning Data management Data Processing
I want to create two columns: Column A with all the countries listed in the photo below Column B with one of 3 options (Advanced Economies...
Side-by-side boxplots with markers for means

Side-by-side boxplots with markers for means

1:23 PM Data Cleaning Data management Data Processing
Hello, I have country-level panel data for GDP per capita for the past 10 years that I wish to represent in a side-by-side boxplot (by yea...
Creating a scatterplot with two different variables

Creating a scatterplot with two different variables

4:24 AM Data Cleaning Data management Data Processing
How to create a scatterplot with two different variables one being dependent and one being independent? the original question is: Create...
Callagain command by Behaghel et al.

Callagain command by Behaghel et al.

3:23 AM Data Cleaning Data management Data Processing
Hi I'm currently trying to run the command "callagain" by Behaghel et al. (to be found here ). Unfortunately, the command do...
Writing a formula in which stata chooses a value or 1

Writing a formula in which stata chooses a value or 1

3:23 AM Data Cleaning Data management Data Processing
Hi! I'm trying to use this formula to calculate eGFR: eGFR = 142*min(standardized Scr/K, 1)^α *max(standardized Scr/K, 1)^-1.200 *0.99...
Adding rows under a variable

Adding rows under a variable

12:23 AM Data Cleaning Data management Data Processing
Stata command for adding rows lets say 10 rows under a variable which has fixed observations like 40 for each unique id
please help. making bar graph more simple with "over" options

please help. making bar graph more simple with "over" options

Tuesday, November 22, 2022 Data Cleaning Data management Data Processing
Hi, guys. I'm a newcomers with stata, and there is some trouble in making bar graph. My data has 46 observations, and it has numeric...
Please help cant work out how to t-test. Im new to stata

Please help cant work out how to t-test. Im new to stata

5:23 PM Data Cleaning Data management Data Processing
Hi guys I'm struggling to compare 2 different regions with a t-test. As seen from the screenshots I have multiple regions and have gen...
Pseudo Panel Data and Mediation Analysis

Pseudo Panel Data and Mediation Analysis

2:23 PM Data Cleaning Data management Data Processing
Dear Stata Experts I'm a PhD student, and I'd like to know how to use the codes to perform the Mediation analysis when using pseud...
Using cii proportions with loop

Using cii proportions with loop

1:23 AM Data Cleaning Data management Data Processing
Hello, I am trying to compute confidence intervals for proportions (number of cases / total) on each observations of a simple database usi...
LSDV and collinearity

LSDV and collinearity

Monday, November 21, 2022 Data Cleaning Data management Data Processing
Hi everyone, I am having trouble implementing a simple least square dummy variable (LSDV) model. The model I am implementing is the follow...
Space between axis and line chart

Space between axis and line chart

3:23 PM Data Cleaning Data management Data Processing
Hi, I have dataset starting in Febuary 2020 but when I create a chart for some reason the x axis starts on the first of January, so there is...
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Latest Articles

Categories

  • CouchDb Skills
  • Data Analysis
  • Data Cleaning
  • Data management
  • Data Processing
  • Research Methodology

Popular Articles

  • How to drop random years from panel data?
    I have a panel data set, consisting of 125 countries, 36 years. I want to run an IV regression multible times and randomly drop 5 (of the 36...
  • Saving pointer matrixes using -mata matsave-
    I am relatively new to the use of pointers in Mata and have thusfar been impressed with their utility. Specific to this query, I have been...
  • instrumenting a binary endogenous regressor
    Hello, I am trying to run a model with a binary endogenous regressor. I am still learning econometrics so I am sorry if this may be a trivi...
  • "tsegen" by group
    Hi, I would like to calculate the moving average of _b_LogSize _b_LogBM _b_MOM12 _b_cons by months of the year over the last 10 years. For...
  • Fixed Effects for a Panel at a Coarser Level
    Hello, I want to include some fixed effects in my model that I believe are difficult to include so any advice on how exactly this can be d...
  • RDD rdrobust problem
    Dear all, I am researching the effect of grade retention on exam results (which can vary from 0 to 20) and I am using a RDD to research th...
  • Growth model - No convergence
    I would like to develop a latent growth model (LGM) with Stata. The point is to illustrate estimated effects of predictors by using Stata...
  • Nvidia Organizational Structure: functional and hybrid
    Nvidia is 7th largest company in the world with a market cap of USD 1 trillion. Due to the size and scope of its operations, it is difficult...
  • Getting values from second to last loop of a -while- loop
    Hi fellow Statalisters, I am using a -while- loop for a particular application, where I need to retrieve a particular value from the secon...
  • Using weights with xtheckman | xtheckman's fixed effects equivalent
    Hi, I am using six waves of the PSID to estimate several determinants (particularly wealth) of the wage equation and the selection equatio...

Recomended Articles

Powered by Blogger.

About Me

Mtenga Baltazar
View my complete profile

Blog Archive

  • ►  2024 (6)
    • ►  February (6)
  • ►  2023 (877)
    • ►  November (1)
    • ►  October (9)
    • ►  September (14)
    • ►  July (9)
    • ►  June (15)
    • ►  May (133)
    • ►  April (174)
    • ►  March (176)
    • ►  February (157)
    • ►  January (189)
  • ▼  2022 (2201)
    • ►  December (181)
    • ▼  November (180)
      • trend over years for categorical variable
      • how to create the start and end date for a year
      • Perform a paired ttest on two substracts of the sa...
      • OLS Regression - explanation of coefficients with ...
      • How to write this with a loop (repetitive coding w...
      • Two way graph with multiple lines in a loop
      • using newey west for heteroskedasticity and autoco...
      • creating a dummy variable based on percentage
      • local macro text with line break
      • Editing graph with a TIFF file
      • pweight with melogit
      • Formal tests of volatility in STATA17
      • Color changes with PNG export.
      • Generating the "opposing" variable in a long dataset
      • convert string yyyy-mm-dd hh:mm:ss to %td format
      • Stata command for weighted M-estimator.
      • double-hurdle model not feasible
      • How I find the wrong data?
      • Create Twoway Line Graph Forcing Gaps for Missing ...
      • Treatment Variation Plot
      • Create a matrix or data set from current variables...
      • Reshape data
      • Loop with a synthetic control method
      • Method deriving weight of second level for mtobit ...
      • Leading zero
      • Multiple random slopes in a mixed linear model
      • Optimal lag selection in Granger Causality tests
      • Main effects of two independent variables across f...
      • How to draw overlayed coefplot with only one regre...
      • Duplicate row*
      • Formatted IQR using Collect
      • About Foreach or Forvalue
      • GLM binomial logit model gof - Deviance
      • Help: weights not allowed r(101)
      • Estimating latent class models in Stata using both...
      • xtivreg2: endogeneity and overidentification
      • Household Fixed Effect
      • Problems with command "etable"
      • Which test should i use on Stata ?
      • Understanding type of panel
      • How to calculate days and hours between two dates
      • Problem of missing observations in CAPM estimation
      • egen for numeric variables
      • DiD
      • Variable not recognized after modification
      • Unable to report & understand relogit marginal eff...
      • Rearranging columns and rows to make it country-le...
      • Side-by-side boxplots with markers for means
      • Creating a scatterplot with two different variables
      • Callagain command by Behaghel et al.
      • Writing a formula in which stata chooses a value or 1
      • Adding rows under a variable
      • please help. making bar graph more simple with "ov...
      • Please help cant work out how to t-test. Im new to...
      • Pseudo Panel Data and Mediation Analysis
      • Using cii proportions with loop
      • LSDV and collinearity
      • Space between axis and line chart
      • add group axis label to chart
      • Single and Quadratic function in one loop
      • Problems with Interval Regression
      • Using instrumental variable in difference-in-diffe...
      • Random effect model and correcting heteroscedastic...
      • All standard errors missing
      • cmp command with panel data
      • Comparing subcategories between groups
      • Comparing the subcategories between groups
      • Help estimates table and Hausman test
      • Predict fxn
      • Annual return from each company, wen having monthl...
      • count in groups
      • Problem with displaying multiple models using coef...
      • P-value not provided?!
      • importing a .csv file
      • Methods for computing the point-biserial correlation
      • Transposing selected observations from the same da...
      • Difference in Difference model with panel data
      • summary stats with years
      • Distribution of gender within subgroups of a group
      • Order Coefficients in coefplot
      • ivprobit reports first stage results even w/o `fir...
      • How to create matrix from a vector?
      • Coding for medication data
      • Fitting dynamic random-effects probit model - xtdyn-
      • Ordered probit before applying ivregress 2sls commend
      • no observations r(2000) error after some observati...
      • Removing numbers from text in labels
      • Working Directory Keeps Changing by Itself
      • weakivtest for 2 endogenous variables case
      • How to display the scale in the center instead of ...
      • Durbin–Watson d-statistic
      • DID parallel trend test with 1 year pre period and...
      • stmixed for recurrent time-to-event data
      • Duplicate all the values within a local
      • For loop for running multiple regressions in Stata
      • Multiply two data sets
      • How to calculate percentage of certain categories ...
      • Penalized spline models with -mixed-
      • Unequal interval systematic sampling
      • Loop over variables
    • ►  October (198)
    • ►  September (182)
    • ►  August (182)
    • ►  July (194)
    • ►  June (174)
    • ►  May (167)
    • ►  April (181)
    • ►  March (186)
    • ►  February (170)
    • ►  January (206)
  • ►  2021 (7379)
    • ►  December (327)
    • ►  November (645)
    • ►  October (646)
    • ►  September (639)
    • ►  August (557)
    • ►  July (649)
    • ►  June (656)
    • ►  May (697)
    • ►  April (683)
    • ►  March (697)
    • ►  February (518)
    • ►  January (665)
  • ►  2020 (7956)
    • ►  December (653)
    • ►  November (659)
    • ►  October (598)
    • ►  September (654)
    • ►  August (660)
    • ►  July (682)
    • ►  June (683)
    • ►  May (708)
    • ►  April (692)
    • ►  March (698)
    • ►  February (638)
    • ►  January (631)
  • ►  2019 (9458)
    • ►  December (601)
    • ►  November (643)
    • ►  October (650)
    • ►  September (637)
    • ►  August (645)
    • ►  July (681)
    • ►  June (654)
    • ►  May (1034)
    • ►  April (1079)
    • ►  March (1122)
    • ►  February (876)
    • ►  January (836)
  • ►  2018 (931)
    • ►  December (692)
    • ►  November (239)

© BJ Data Tech Solution | Theme by Rifki.id | Premium Blogger Templates | PBT | Powered by Blogger |-| About | Privacy Policy | Sitemap | Contact | Disclaimer