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
Assign value to a categorical variable between two limits

Assign value to a categorical variable between two limits

Tuesday, November 30, 2021 Data Cleaning Data management Data Processing
Dear users, hope everyone is well. i want to assign value of 3 to the variable "dum" when the current year "survival" ...
Counting Observations in Panel Data and filling in missing values

Counting Observations in Panel Data and filling in missing values

7:23 PM Data Cleaning Data management Data Processing
Hello everyone, I am new to STATA and have a question regarding the preparation of my Data sample. "PERMCO" shows the respective ...
post hoc for Fisher's exact test

post hoc for Fisher's exact test

6:23 PM Data Cleaning Data management Data Processing
Hello. Hope everyone is doing well. I would like to do a post hoc test after Fisher's exact test. I think Bonferroni correction can b...
Loop to merge multiple dta files

Loop to merge multiple dta files

6:23 PM Data Cleaning Data management Data Processing
Hi all, I am trying to run a loop to merge 10 files names year_1, year_2, ...., year_10 all at once. Each dataset has 4 variables - ID, g...
Counting Observations in Panel Data and filling in missing values

Counting Observations in Panel Data and filling in missing values

6:23 PM Data Cleaning Data management Data Processing
Hello everyone, I am new to STATA and have a question regarding the preparation of my Data sample. "PERMCO" shows the respective ...
Creating subset in STATA

Creating subset in STATA

6:23 PM Data Cleaning Data management Data Processing
Dear Madam/Sir, I run the following regression and want to use only observations (77,626) that regression is run to generate descriptive s...
Reshaping long to wide problems

Reshaping long to wide problems

6:23 PM Data Cleaning Data management Data Processing
Hello everyone, I am dealing with a large national database (TQIP) which has a series of variables (ICD and AIS codes) stored in long data...
Collapse/aggregate on hourly level

Collapse/aggregate on hourly level

4:23 PM Data Cleaning Data management Data Processing
Hello everyone, I have a dataset reporting diesel price changes for different petrol stations (station_uuid) during one day with the follo...
Stata technique for CPPML

Stata technique for CPPML

4:23 PM Data Cleaning Data management Data Processing
Hello, does anyone have practical experience in Stata with Constrained Poisson Pseudo Maximum Likelihood Estimation (CPPML) by Pfaffermayr...
How to sum variable by year for specific group id

How to sum variable by year for specific group id

2:23 PM Data Cleaning Data management Data Processing
The original dataset has the following structure: group_id | year | varx 1 1998 5 1 1998 5 1 1999 2 2 1998 1 2 1998 1 2 1998 1 2 19...
Question about stsplit

Question about stsplit

2:23 PM Data Cleaning Data management Data Processing
Hi all, I would like to write a command to stsplit a dataset thus: Code: stsplit newvar, at( datelist) instead of Code: stspli...
xtabond2

xtabond2

2:23 PM Data Cleaning Data management Data Processing
Hello everyone, I am currently working with dynamic panel data. The model I want to estimate using the Arellano-Bond estimator is the foll...
Multilevel model (binary outcome) with spatial weight matrix (not panel data)

Multilevel model (binary outcome) with spatial weight matrix (not panel data)

2:23 PM Data Cleaning Data management Data Processing
Hi Stata forum users, Does stata have any option to incorporate a spatial weight matrix with melogit or meqrlogit ? I can create the spati...
How to balance an unbalanced panel on the year variable?

How to balance an unbalanced panel on the year variable?

2:23 PM Data Cleaning Data management Data Processing
Hello everyone! I am fairly new to Stata and am unable to solve (perhaps) very basic problems. I am working with a panel data for the firs...
Fractional logit model for proportions over time

Fractional logit model for proportions over time

11:23 AM Data Cleaning Data management Data Processing
Dear all, I have calculated a “Diversity Index” for a given population. Per the census website, the DI: “the DI tells us the chance that two...
Fractional logit model for proportions over time

Fractional logit model for proportions over time

11:23 AM Data Cleaning Data management Data Processing
Dear all, I have calculated a “Diversity Index” for a given population. Per the census website, the DI: “the DI tells us the chance that two...
Comparing age adjusted mortality rates

Comparing age adjusted mortality rates

9:23 AM Data Cleaning Data management Data Processing
Hello everyone. I am trying to compare age-adjusted mortality rate for two population. Rural age adjusted mortality rate is 50 per 10,00,0...
Drop variables based on name

Drop variables based on name

9:23 AM Data Cleaning Data management Data Processing
Hi, I have a dataset with 100 variables, 50 of which are called Xi_ante and 50 of which are called Xi_post. I want to delete those with ...
Logit & conformability error in inteff

Logit & conformability error in inteff

9:23 AM Data Cleaning Data management Data Processing
I am using a survey data to run a logit regression, and currently I am testing the interactions of two continuous variables. I read Norton ...
Instrumental variable analysis with multiple imputation

Instrumental variable analysis with multiple imputation

9:23 AM Data Cleaning Data management Data Processing
Hello all, I will please like to find out if IV analysis works with imputed data (i.e using multiple imputation). If it does, then how do...
Stata dropping interacting Time Period Covariates. Can't figure out why.

Stata dropping interacting Time Period Covariates. Can't figure out why.

7:23 AM Data Cleaning Data management Data Processing
Good Morning. I am trying to run a simple descriptive regression on a year-district (1964-2002, ~400 districts) panel: reg Y Democracy##...
Get name of specific variable which name is equal to another value of a variable

Get name of specific variable which name is equal to another value of a variable

7:23 AM Data Cleaning Data management Data Processing
I have a study where I am to look 28 days back in time before an event to see if the patients were working or not working. Each patient has...
IV estimation (2SLS) with slope dummy variable interacting with endogenous variable.

IV estimation (2SLS) with slope dummy variable interacting with endogenous variable.

7:23 AM Data Cleaning Data management Data Processing
Hi, I want to estimate a regression with a dummy variable, say D. My dependent variable is Y. My exogeneous indenpendent variables are X, Z ...
Cross sectional dependency in panel data

Cross sectional dependency in panel data

6:23 AM Data Cleaning Data management Data Processing
Hello, I am working on a panel data of six Emerging economies with quarterly data from 2000-2020. Some of the variables are cross sectiona...
keep the last observation(s) in each year

keep the last observation(s) in each year

6:23 AM Data Cleaning Data management Data Processing
Dear All, Suppose that the data set is Code: * Example generated by -dataex-. To install: ssc install dataex clear input str6 Stkcd str10 ...
loop for missing values

loop for missing values

5:23 AM Data Cleaning Data management Data Processing
Hi everyone! I am trying to complete a database in form of a "tree", adding as values the last available observation when a new br...
Esttab: Store value of matrix and display in tex-table

Esttab: Store value of matrix and display in tex-table

5:23 AM Data Cleaning Data management Data Processing
Dear All, I am encountering the following issue. I want to compute a mean after a regression with the mean function ("sum" does ...
R2 for xtnbreg model

R2 for xtnbreg model

3:23 AM Data Cleaning Data management Data Processing
Hello everyone, i am currently analyzing a count variable with the -xtnbreg- command. This command does not show me the R2 of my model, b...
Missing values

Missing values

3:23 AM Data Cleaning Data management Data Processing
Hello, fellow stata lovers! I am working on my thesis and have a dataset from the Enterprise Survey available with 241 observations. Howev...
Displaying Significance Stars in combined summary and correlations table

Displaying Significance Stars in combined summary and correlations table

3:23 AM Data Cleaning Data management Data Processing
Dear Forum, i merged my correlations and summary statistics to one table via the below code (thanks again to the forum) and now would like...
Dumitrescu & Hurlin (2012) Granger non-causality test

Dumitrescu & Hurlin (2012) Granger non-causality test

3:23 AM Data Cleaning Data management Data Processing
Hello Dears, I am trying to see the granger causality between government revenue and government spending. I am using panel data of 40 count...
interpretation of log-linear model vid interaction term

interpretation of log-linear model vid interaction term

3:23 AM Data Cleaning Data management Data Processing
Hello! I'm having a hard time interpreting my results from my regression which is: Ln(sales) = beta0 + beta1G + beta2Finance + beta3...
Standardizing categorical variables

Standardizing categorical variables

1:23 AM Data Cleaning Data management Data Processing
Dear Statalist, I am running a linear probability model with categorical variables. Some of the independent variables have two categories,...
Each table on a new page using asdoc

Each table on a new page using asdoc

1:23 AM Data Cleaning Data management Data Processing
Hello everyone, I am running DEA models and I was wondering if it is possible to start the output of each model on a new page in word usi...
Negative error variance

Negative error variance

Monday, November 29, 2021 Data Cleaning Data management Data Processing
Dear StataListers, what should I do if I get a negative error variance in the stimation of structural equation model or in a confirmatory fa...
Count distinct values by groups

Count distinct values by groups

3:23 PM Data Cleaning Data management Data Processing
Hello everyone, I have one question related to counting distinct values by groups. Here is an example of the data with ID, year, and the j...
Does lowess take a long time?

Does lowess take a long time?

3:23 PM Data Cleaning Data management Data Processing
I am running Stata SE/17.0 on a Windows machine with Intel i7 1.8GHz, and 32GB RAM. So not exactly top of the line, but not a "weak...
Panel Data

Panel Data

9:23 AM Data Cleaning Data management Data Processing
Hello I am making a panel data model where I have the following regression: xtreg Domestic_Health rDomestic_Health GPE_subindex i.Country ...
Creation of Compound Interest variable

Creation of Compound Interest variable

9:23 AM Data Cleaning Data management Data Processing
Good evening everyone, I do have the closing prices NAV (net asset value) and I calculate the return as follows: nav_ret=ln(nav/nav[_n-1]....
Comparing cox proportional hazard linear and non-linear (restricted cubic spline) models using likelihood ratio test

Comparing cox proportional hazard linear and non-linear (restricted cubic spline) models using likelihood ratio test

9:23 AM Data Cleaning Data management Data Processing
Hi folks - I am trying to understand and figure out how to actually code/test non-linearity between spline (cox proportional hazards regress...
How can I create this variable?

How can I create this variable?

9:23 AM Data Cleaning Data management Data Processing
Hi, I have data for the total number of Corona cases and the total population. What should I do to create this ”Corona cases per 1.000.000 ...
Plotting the slope

Plotting the slope

7:23 AM Data Cleaning Data management Data Processing
Good day Statalisters! Is there a command in Stata where I can plot a curve using the lower bound and upper bound slopes I have obtained f...
Regression with propensity score

Regression with propensity score

6:23 AM Data Cleaning Data management Data Processing
Dear all I am trying to estimates the dynamic treatment effect while using propensity scores. I would normally use the 'teffects psmatc...
reshaping long-long (?) data (all variables and observations in the single column)

reshaping long-long (?) data (all variables and observations in the single column)

6:23 AM Data Cleaning Data management Data Processing
Dear all, I have data from the IEA that looks like this: Code: * Example generated by -dataex-. To install: ssc install dataex clear inp...
Calculate shares by variable and a condition

Calculate shares by variable and a condition

6:23 AM Data Cleaning Data management Data Processing
Hi Stata Users, I have household data and would like to calculate age specific enrollment rates i.e. share of children in at a specific ag...
Stata 17 - how to get forest plots with risk ratio and not log risk ratio

Stata 17 - how to get forest plots with risk ratio and not log risk ratio

3:23 AM Data Cleaning Data management Data Processing
Hi I am new to Stata 17 meta analysis forest plots. I am analysing binary data for treatment(Yes/No) and Control (Yes/No). I use dropdown...
areg in cross-sectional data and multicollinearity

areg in cross-sectional data and multicollinearity

3:23 AM Data Cleaning Data management Data Processing
Hello, I have a cross sectional data consisting of 632 banks in 67 countries. In my dataset I have many variables with banks ratios, such a...
Regress for each company by using "foreach" or "forvalues" command

Regress for each company by using "foreach" or "forvalues" command

3:23 AM Data Cleaning Data management Data Processing
Hi there, My panel data set includes 389 companies and 51 quarter years. I am trying to regress my regression for each company and to save...
How to change scientific notation into standard format?

How to change scientific notation into standard format?

3:23 AM Data Cleaning Data management Data Processing
Hello all, can anyone please guide me, how can I get rid of scientific notation in the summary down below? I am interested in the full form...
Generate grouping variable based on various nominal variables

Generate grouping variable based on various nominal variables

3:23 AM Data Cleaning Data management Data Processing
Dear community, I'm working with household data containing various nominal or ordinal variables such as household type, income group, ...
Unequal number of observations in percentile groups

Unequal number of observations in percentile groups

1:23 AM Data Cleaning Data management Data Processing
Hi Stata users, I am trying to come up with percentile groups using the code below Code: _pctile asset_index, nquantiles(100) return l...
Constructing Gini Index for Household data

Constructing Gini Index for Household data

Sunday, November 28, 2021 Data Cleaning Data management Data Processing
Dear All I'm computing the Gini coefficient in Stata 16 with the" ineqdeco" command. I'm using panel data from the Househ...
estimating 5 year survival

estimating 5 year survival

8:23 PM Data Cleaning Data management Data Processing
Hi, I have a dataset with survival months and event (dead/alive). I have been able to stset it and calculate various survival statistics fr...
Creating a combined graph

Creating a combined graph

8:23 PM Data Cleaning Data management Data Processing
Hi, I'm struggling to get this right. I have 2 variables that I want to show on a single graph. Firstly, is % of patients who survive ...
poisson regression (ppmlhdfe) with multiplicative error

poisson regression (ppmlhdfe) with multiplicative error

8:23 PM Data Cleaning Data management Data Processing
Is there a way to force ppmlhdfe to use multiplicative error term instead of additive? I wan to run a poisson regression with instruments ...
OLS vs FE vs RE? Tests results conflicts.

OLS vs FE vs RE? Tests results conflicts.

8:23 PM Data Cleaning Data management Data Processing
Dear Stata specialists, Hope you can help me solve my problem. I recently run OLS, FE, RE for my panel data model and perform some tests...
Detrending in Dynamic Panel Data regression

Detrending in Dynamic Panel Data regression

3:23 PM Data Cleaning Data management Data Processing
Hello, I am running a dynamic panel data regression. However 3 out of my 7 variables are stationary at trend level. I wanted to know if ...
Help with two way fixed effect and event study?

Help with two way fixed effect and event study?

2:23 PM Data Cleaning Data management Data Processing
Hello, I'm currently working on a project where I asses whether or not a program has made an impact on contraception need. The program ...
Create an index

Create an index

2:23 PM Data Cleaning Data management Data Processing
I need to group 3 variables to build an index in Stata. Each variable refers to a question in a questionnaire. The point is that they all ha...
Interpreting results: 1-standard-deviation increase in an explanatory variable

Interpreting results: 1-standard-deviation increase in an explanatory variable

2:23 PM Data Cleaning Data management Data Processing
This table provides results of the analysis of the role of tax avoidance on returns. The dependent variables are Cumulative abnormal returns...
Interpreting impulse response with log percentage as dependent variable and first difference of share as independent one

Interpreting impulse response with log percentage as dependent variable and first difference of share as independent one

11:23 AM Data Cleaning Data management Data Processing
Hello everyone, I estimate a VAR model where the dependent variable is log-transformed percentage (0-100) and the independent variable is ...
error:*convergence not achieved

error:*convergence not achieved

10:23 AM Data Cleaning Data management Data Processing
Hello everyone I am getting the error: convergence not achieved and I don't know why. I am using this command: Code: local contro...
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)
    • ►  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)
      • Assign value to a categorical variable between two...
      • Counting Observations in Panel Data and filling in...
      • post hoc for Fisher's exact test
      • Loop to merge multiple dta files
      • Counting Observations in Panel Data and filling in...
      • Creating subset in STATA
      • Reshaping long to wide problems
      • Collapse/aggregate on hourly level
      • Stata technique for CPPML
      • How to sum variable by year for specific group id
      • Question about stsplit
      • xtabond2
      • Multilevel model (binary outcome) with spatial wei...
      • How to balance an unbalanced panel on the year var...
      • Fractional logit model for proportions over time
      • Fractional logit model for proportions over time
      • Comparing age adjusted mortality rates
      • Drop variables based on name
      • Logit & conformability error in inteff
      • Instrumental variable analysis with multiple imput...
      • Stata dropping interacting Time Period Covariates....
      • Get name of specific variable which name is equal ...
      • IV estimation (2SLS) with slope dummy variable int...
      • Cross sectional dependency in panel data
      • keep the last observation(s) in each year
      • loop for missing values
      • Esttab: Store value of matrix and display in tex-t...
      • R2 for xtnbreg model
      • Missing values
      • Displaying Significance Stars in combined summary ...
      • Dumitrescu & Hurlin (2012) Granger non-causality test
      • interpretation of log-linear model vid interaction...
      • Standardizing categorical variables
      • Each table on a new page using asdoc
      • Negative error variance
      • Count distinct values by groups
      • Does lowess take a long time?
      • Panel Data
      • Creation of Compound Interest variable
      • Comparing cox proportional hazard linear and non-l...
      • How can I create this variable?
      • Plotting the slope
      • Regression with propensity score
      • reshaping long-long (?) data (all variables and ob...
      • Calculate shares by variable and a condition
      • Stata 17 - how to get forest plots with risk ratio...
      • areg in cross-sectional data and multicollinearity
      • Regress for each company by using "foreach" or "fo...
      • How to change scientific notation into standard fo...
      • Generate grouping variable based on various nomina...
      • Unequal number of observations in percentile groups
      • Constructing Gini Index for Household data
      • estimating 5 year survival
      • Creating a combined graph
      • poisson regression (ppmlhdfe) with multiplicative ...
      • OLS vs FE vs RE? Tests results conflicts.
      • Detrending in Dynamic Panel Data regression
      • Help with two way fixed effect and event study?
      • Create an index
      • Interpreting results: 1-standard-deviation increas...
      • Interpreting impulse response with log percentage ...
      • error:*convergence not achieved
      • Normality test and intrpretation of swilk shapiro ...
      • How to zipfile/unzipfile an excel file with password
      • Cleaning Messy Address Data
      • one sided interpretation and table notation
      • xtoverid with error: operator invalid
      • Avoiding Duplicated variables because of calculati...
      • Matching across three groups of a dependent variable
      • Two way hbar
      • SUR Estimation - Equation residuals
      • keeping the last observation only
      • Why generating the variable in logarithm form chan...
      • Regression with moderation in Stata
      • e(clust#) not working in reghdfe
      • Goodness-of-fit for binomial (not inverse binomial...
      • How to ask stata to round the labels in a histogram?
      • Potential problems with transforming a dataset of ...
      • Merge two datasets
      • STATA 1 Reference Manual now available to anyone w...
      • Assign specific value in Ranked Column if...
      • How to perform calculation on a Dijkstra algoritm
      • Select a varible name by value and put it as value...
      • What is wrong with my Stata code for a ppml regres...
      • stack-related problem?
      • Generate Month and Year variables
      • threshold model vs interaction
      • Avoiding confounders when sampling from a larger c...
      • Monthly panel data with missing values of annual b...
      • entropy and missing values
      • Problem with margins after regression with cubic s...
      • Help with Tabout One-way table
      • sdmxuse error with OECD API
      • Reshape long multiple variables error invalid "var...
      • threshold and moderation
      • Ardl
      • dropping the outlier
      • age of the firm
      • 2022 Northern European Stata Conference
      • Graph bar with a grading palette of colors
    • ►  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