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
Problems corresponding to variable names in stata double-layer loops

Problems corresponding to variable names in stata double-layer loops

Tuesday, May 31, 2022 Data Cleaning Data management Data Processing
I encountered a problem in the process of data merging. I put 5 control variables into 5 sheets of an excel table. After converting the pane...
How to loop through multiple locals instead of all variables inside each local?

How to loop through multiple locals instead of all variables inside each local?

10:23 PM Data Cleaning Data management Data Processing
Code: local ipv "angry fear intimacy_idx cont12_idx ev12_idx pv12_idx sv12_idx ipv_ovall_idx" local ipv_12_entire "cont12_i...
How to loop through two locals instead of all variables inside each local

How to loop through two locals instead of all variables inside each local

7:23 PM Data Cleaning Data management Data Processing
Code: local ipv "angry fear intimacy_idx cont12_idx ev12_idx pv12_idx sv12_idx ipv_ovall_idx" local ipv_12_entire "cont1...
Transformation of values

Transformation of values

4:23 AM Data Cleaning Data management Data Processing
Hi, I have a data set on tumors with the variables karnofsky index/KI (categorical with values 40, 60, 80, 90, 100) and gross tumor volume...
keep observations if first 2 character of the string is capital letter

keep observations if first 2 character of the string is capital letter

3:23 AM Data Cleaning Data management Data Processing
I have a dataset where the variable x is a string. I need to keep only observations at which the first 2 characters in the variable x is cap...
Latent growth curve modeling

Latent growth curve modeling

1:23 AM Data Cleaning Data management Data Processing
Dear experts, I am currently trying to fit an unconditional growth curve model (as a first step before looking forward to more complex mode...
Heckman

Heckman

Monday, May 30, 2022 Data Cleaning Data management Data Processing
Hi, How do I apply weights in Heckman selection model? Thank you
Compare coefficients with xtreg i.year and fe

Compare coefficients with xtreg i.year and fe

8:23 PM Data Cleaning Data management Data Processing
Hello, I have two models: Model A: Y = α1 + β1X1 + Σθ∙C + firm-fixed effect + year-fixed effect Model B: Y = α1 + β2X2 + Σθ∙C + firm-f...
adjustrcspline error

adjustrcspline error

6:23 PM Data Cleaning Data management Data Processing
I'm trying to fit an stcox model with cubic splines to see the association between mortality and ratiopasit where ratiopasit is the rati...
Clarification on Methods used for 95% CI Calculation in sts list Commands

Clarification on Methods used for 95% CI Calculation in sts list Commands

5:23 PM Data Cleaning Data management Data Processing
Hello, Would anyone be able to clarify the following three questions about the methods Stata uses to calculate confidence intervals for th...
Resize graphs for putexcel but obtain good quality

Resize graphs for putexcel but obtain good quality

1:23 AM Data Cleaning Data management Data Processing
Dear all I am creating a data report with Excel and use putexcel to transfer the Stata graphs to excel. The height option has to be large ...
GLS Fixed Effects regression, Omitted because of Collinearity

GLS Fixed Effects regression, Omitted because of Collinearity

Sunday, May 29, 2022 Data Cleaning Data management Data Processing
Dear Stata community, Hi, I have a panel data (Company ID, years) independent variables(MTB, size, growth, roa, tangibility, covid19: dumm...
generating a new variable based on 2 conditions

generating a new variable based on 2 conditions

10:23 PM Data Cleaning Data management Data Processing
hello there new stata user i have a dataset that look like this date_m com date com_ret Date com_cap smb_group groupmean 2018m12 Comp7...
Plot the estimated hazard curve at mean-1*SD mean, and mean+1*SD after fitting survival analysis using Stata.

Plot the estimated hazard curve at mean-1*SD mean, and mean+1*SD after fitting survival analysis using Stata.

8:23 PM Data Cleaning Data management Data Processing
Hi, everybody, I have a dataset like this, * Example generated by -dataex. clear input int id int time byte injury byte safescore 1 1 1...
Unbalanced Panel - Structural Breaks

Unbalanced Panel - Structural Breaks

5:23 PM Data Cleaning Data management Data Processing
I have an unbalanced panel dataset. I am looking to do structural break analysis and came across xtbreak and estat sb commands. However, the...
45-Degree Line with Marginsplot

45-Degree Line with Marginsplot

4:23 PM Data Cleaning Data management Data Processing
Dear all, I am trying to add a diagonal/45-degree line to my marginsplot, but (function y=x, ...) does not work. Could anyone tell me whethe...
Using CRSP to calculate the Cumulative Abnormal Return

Using CRSP to calculate the Cumulative Abnormal Return

3:23 PM Data Cleaning Data management Data Processing
Hello everyone, This is a very noob question, I am trying to get the quarterly CAR. However, my school's subscription only provides da...
True Random Effect Greene

True Random Effect Greene

3:23 AM Data Cleaning Data management Data Processing
Dear sir, Recently i've been trying using SFA to determine the efficiency of Gov't Spending. Im using Greene true random effect (T...
New package -rori- on the SSC

New package -rori- on the SSC

1:23 AM Data Cleaning Data management Data Processing
Thanks to Kit Baum, there is a new package -rori- on the SSC. rori -- Immediate command for estimation of selection bias through relative ...
Drop observations if not meeting frequency criterium

Drop observations if not meeting frequency criterium

12:23 AM Data Cleaning Data management Data Processing
My dataset consists of time-series observation of US firms with identifiers like gvkey, cusip and a construct variable cusip_fiscalyear. I u...
Creating a 2 Y-axis line using two datasets

Creating a 2 Y-axis line using two datasets

Saturday, May 28, 2022 Data Cleaning Data management Data Processing
Hello Stata community; I have 2 Stata datasets: one is called Republicans, and the other one is Sunspots. Example of Republicans data: C...
sample size-new

sample size-new

3:23 AM Data Cleaning Data management Data Processing
From a published study we have the following information. Here there is only one group (preterm infants, 56 infants) in which the variable ...
Reference group with multiple dichotomous variables

Reference group with multiple dichotomous variables

2:23 AM Data Cleaning Data management Data Processing
Hello Statalist I have a question regarding how to interpret the reference group in my logistic regression. I have four independent variab...
Portfolio average

Portfolio average

1:23 AM Data Cleaning Data management Data Processing
Hi, I'm currently writing my bachelor thesis and I'm new to Stata. I have monthly data and I want to sort the data monthly in 5 port...
Sample size

Sample size

1:23 AM Data Cleaning Data management Data Processing
Hello everyone, I ask for advice on the calculation of the sample size ... From a previous study (which considered 56 highly preterm infant...
Running Multinomial Probit on unbalanced Panel data

Running Multinomial Probit on unbalanced Panel data

Friday, May 27, 2022 Data Cleaning Data management Data Processing
I have unbalanced panel data on household cooking energy, with total observations equal to 1762 as follows: Year Count 2010 2013 ...
Reshaping long for variables with two indexes

Reshaping long for variables with two indexes

2:23 AM Data Cleaning Data management Data Processing
Dear Statalisters, I am having a little issue with the -reshape long- command as I'm discovering it for the first time and I'm not...
Split string variable by the last word that meets character length limit

Split string variable by the last word that meets character length limit

1:23 AM Data Cleaning Data management Data Processing
I am trying to upload a csv on website however, it requires that the character length for the field should not be greater than 500. Since ...
How to count firm number in panel data?

How to count firm number in panel data?

Thursday, May 26, 2022 Data Cleaning Data management Data Processing
Hello, I have some troubles in counting the firm number in panel data. I have 3741 fiscal year observations during 1994-2006. And I want t...
Trailing but not leading zeros in display format

Trailing but not leading zeros in display format

5:23 AM Data Cleaning Data management Data Processing
I would like to display a set of probabilities at two decimal places but with no leading zeros. E.g. I would like .95 to display as .95 and ...
GMM estimation and Agumented taylor rule

GMM estimation and Agumented taylor rule

5:23 AM Data Cleaning Data management Data Processing
How to estimate the four parameters of the Augmented Taylor Rule i_t=(1-ρ)α+(1-ρ)βπ_(t+n)+(1-ρ)γx_t+ρi_(t-1)+ε_t using Generalized Method...
Color for figure: twoway (tsline)

Color for figure: twoway (tsline)

3:23 AM Data Cleaning Data management Data Processing
Hi all, I am making a figure and I would like to differentiate between colors. Specifically, I want the K2K CEMs to have a different colo...
graph x-axis not legible

graph x-axis not legible

1:23 AM Data Cleaning Data management Data Processing
I used the code below to generate the attached plot but the values on the x-axis are not legible. Kindly assist. coefplot /// Array (De...
Formatting datetime from one format to another in same variable

Formatting datetime from one format to another in same variable

12:23 AM Data Cleaning Data management Data Processing
Hello everyone! I am facing some issues with my timestamp variable. The data that I have received from the field are in 2 formats: 1) 17...
How to weight the Gini coefficient decomposition?

How to weight the Gini coefficient decomposition?

Wednesday, May 25, 2022 Data Cleaning Data management Data Processing
hi all, i want the Gini coefficient decomposition in Lerman-Yitzhaki's method. but "descogini" doesn't support weights....
Accessing Files Created within Subprogram

Accessing Files Created within Subprogram

6:23 PM Data Cleaning Data management Data Processing
I am writing a Stata .ado program that performs the same subroutine many times. As such, I would like to turn this subroutine into its own s...
Overlay graphics in Stata / Export graphic with transparent background?

Overlay graphics in Stata / Export graphic with transparent background?

3:23 PM Data Cleaning Data management Data Processing
I have 2 graphics (attached, .gph and .png versions of each) that I created with a user-written command (gsa) in Stata 17. They stem from th...
Fixed Effects: how to report in a table

Fixed Effects: how to report in a table

12:23 AM Data Cleaning Data management Data Processing
Hi all, I would like to ask a question, please, about how to report a fixed effects regression in a table. Should I, for a fixed effects...
5*5 bivariate dependent sorting for portfolio creation

5*5 bivariate dependent sorting for portfolio creation

Tuesday, May 24, 2022 Data Cleaning Data management Data Processing
Code: * Example generated by -dataex-. To install: ssc install dataex clear input str15 companies byte stock_id int date double(Returns Id...
Prediction interval (not confidence interval) calculations for glm w/ robust VCE model?

Prediction interval (not confidence interval) calculations for glm w/ robust VCE model?

9:23 PM Data Cleaning Data management Data Processing
In reference to the two threads below, did anybody ever figure out how to get prediction intervals/individual intervals/the stdf command to ...
Difficulty with margins: Wald estimate discrepency between ivreg2 and margins

Difficulty with margins: Wald estimate discrepency between ivreg2 and margins

6:23 PM Data Cleaning Data management Data Processing
Hello, I am trying to estimate the Wald estimand and calculate standard errors using margins and suest, but I'm not able to exactly rep...
Problem with Gen & string/numeric variable conversion

Problem with Gen & string/numeric variable conversion

5:23 PM Data Cleaning Data management Data Processing
Dear forum members, I am new to Stata and having a problem that I can't seem to find a straightforward answer to. I'm dealing with...
Meta analysis using stata 15

Meta analysis using stata 15

4:23 PM Data Cleaning Data management Data Processing
How can I test/visualize subgroup difference. I use metan by(subgroup) but I can’t get the difference between subgroups? anyone can help?
svy: tabulate seems to misprint the extended missing value .z

svy: tabulate seems to misprint the extended missing value .z

2:23 PM Data Cleaning Data management Data Processing
Hello Statalist members, I am using Stata 17 (ver.10May2022). I found that svy: tabulate doesn't seem to work properly, if either the...
Scaling fitted values obtained from first stage of IV

Scaling fitted values obtained from first stage of IV

Monday, May 23, 2022 Data Cleaning Data management Data Processing
Hi everyone: I am running the following regression where I instrument my binary endogenous treatment variable adhd_dx with my instrument q...
Reducing repeated responses to find actual sample size from a multiple imputed dataset

Reducing repeated responses to find actual sample size from a multiple imputed dataset

7:23 PM Data Cleaning Data management Data Processing
Hi there I am hoping someone can advise me on this complex dataset that is derived from a dual frame complex sample design that is provided...
Multiple time-failure analysis, event-specific coeffcients?

Multiple time-failure analysis, event-specific coeffcients?

5:23 PM Data Cleaning Data management Data Processing
Dear all, I am using stcox along with a stratification variable to estimate the hazard functions for a model with recurrent events. Howeve...
How to create control group against fraud firms?

How to create control group against fraud firms?

4:23 PM Data Cleaning Data management Data Processing
Dear all, I want to create a control sample of non-fraud firms against firms that committed fraud. I want the matching based on the firm...
Estimate GARCH-DCC with asymmetries

Estimate GARCH-DCC with asymmetries

2:23 PM Data Cleaning Data management Data Processing
Has anyone had experience estimating GARCH-DCC models with asymmetries (GJR for example)? Can this be done within the mgarch command? Thank...
bysort query

bysort query

Sunday, May 22, 2022 Data Cleaning Data management Data Processing
Hello, I am trying to use bys to generate sequential and total number of Lines of treatments by patient by disease phase (CLL vs RT). The to...
Elasticities

Elasticities

7:23 PM Data Cleaning Data management Data Processing
Hello, I would like to estimate the exports elasticity and the imports elasticity of some countries using STATA. I have the bilateral exp...
Would constant annual variables across firms in a year be fully absorbed by the year dummy?

Would constant annual variables across firms in a year be fully absorbed by the year dummy?

6:23 PM Data Cleaning Data management Data Processing
Hi all, I am running the following regression using reghdfe written by @ Sergio Correia : reghdfe f.Dependent U c.U#c.Q Q $xlist i.year, ...
Storing the value of a variable from one observation in a local macro or scalar

Storing the value of a variable from one observation in a local macro or scalar

5:23 PM Data Cleaning Data management Data Processing
Dear Statalist, I'm using Stata 16.0 trying to store a variable value from one observation in a local macro (if the variable is a stri...
Collapse variables by country, category, year

Collapse variables by country, category, year

4:23 PM Data Cleaning Data management Data Processing
Hi! I have the following data (dataex below) and I just want to confirm if I am doing the right approach given what I want to find. Initia...
How would you export ANOVA tables

How would you export ANOVA tables

2:23 PM Data Cleaning Data management Data Processing
foreach var in Subclass { anova ATF4Targetgenes `var' export ?????????? } Hello everyone, I have created a for each loop to make m...
Criteria to apply xtpcse

Criteria to apply xtpcse

Saturday, May 21, 2022 Data Cleaning Data management Data Processing
Hello everyone. I have a dataset with N = 178 and T =14 . Is it right to go for panel corrected standard errors model.
Questions about pseudo-strata/psu in complex survey design

Questions about pseudo-strata/psu in complex survey design

11:23 PM Data Cleaning Data management Data Processing
Hi: This is not a stata related question, so please forgive me if this is not allowed. I am dealing with the NHIS database which has a c...
convergence not achieved in GMM Model

convergence not achieved in GMM Model

9:23 PM Data Cleaning Data management Data Processing
Dear Statailist I run the GMM regression of my variables in STATA and I have error that w that "convergence not achieved" an...
Base category not displayed

Base category not displayed

7:23 PM Data Cleaning Data management Data Processing
Fellow stata users, I am having trouble getting state to display the base category of the interaction between two variables that are both th...
Panel Data - Random effect model vs Pooled OLS

Panel Data - Random effect model vs Pooled OLS

6:23 AM Data Cleaning Data management Data Processing
Hi Statalist This is my first post, so bear with me if I make some mistakes. I am conducting a Panel Data regression by looking at facto...
ARIMA Model

ARIMA Model

4:23 AM Data Cleaning Data management Data Processing
I am trying to find the arima model that has uncorrelated residuals. I plotted the AC and PAC. I observe that in any of the cases (PAC, AC) ...
reshaping OECD panel data with not unique within i(var1 var2) problem

reshaping OECD panel data with not unique within i(var1 var2) problem

3:23 AM Data Cleaning Data management Data Processing
Hi, Stata masters. I have a problem with reshaping the common panel data which shows " with not unique within i(var1 var2) problem...
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)
      • Problems corresponding to variable names in stata ...
      • How to loop through multiple locals instead of all...
      • How to loop through two locals instead of all vari...
      • Transformation of values
      • keep observations if first 2 character of the stri...
      • Latent growth curve modeling
      • Heckman
      • Compare coefficients with xtreg i.year and fe
      • adjustrcspline error
      • Clarification on Methods used for 95% CI Calculati...
      • Resize graphs for putexcel but obtain good quality
      • GLS Fixed Effects regression, Omitted because of C...
      • generating a new variable based on 2 conditions
      • Plot the estimated hazard curve at mean-1*SD mean,...
      • Unbalanced Panel - Structural Breaks
      • 45-Degree Line with Marginsplot
      • Using CRSP to calculate the Cumulative Abnormal Re...
      • True Random Effect Greene
      • New package -rori- on the SSC
      • Drop observations if not meeting frequency criterium
      • Creating a 2 Y-axis line using two datasets
      • sample size-new
      • Reference group with multiple dichotomous variables
      • Portfolio average
      • Sample size
      • Running Multinomial Probit on unbalanced Panel data
      • Reshaping long for variables with two indexes
      • Split string variable by the last word that meets ...
      • How to count firm number in panel data?
      • Trailing but not leading zeros in display format
      • GMM estimation and Agumented taylor rule
      • Color for figure: twoway (tsline)
      • graph x-axis not legible
      • Formatting datetime from one format to another in ...
      • How to weight the Gini coefficient decomposition?
      • Accessing Files Created within Subprogram
      • Overlay graphics in Stata / Export graphic with tr...
      • Fixed Effects: how to report in a table
      • 5*5 bivariate dependent sorting for portfolio crea...
      • Prediction interval (not confidence interval) calc...
      • Difficulty with margins: Wald estimate discrepency...
      • Problem with Gen & string/numeric variable conversion
      • Meta analysis using stata 15
      • svy: tabulate seems to misprint the extended missi...
      • Scaling fitted values obtained from first stage of IV
      • Reducing repeated responses to find actual sample ...
      • Multiple time-failure analysis, event-specific coe...
      • How to create control group against fraud firms?
      • Estimate GARCH-DCC with asymmetries
      • bysort query
      • Elasticities
      • Would constant annual variables across firms in a ...
      • Storing the value of a variable from one observati...
      • Collapse variables by country, category, year
      • How would you export ANOVA tables
      • Criteria to apply xtpcse
      • Questions about pseudo-strata/psu in complex surve...
      • convergence not achieved in GMM Model
      • Base category not displayed
      • Panel Data - Random effect model vs Pooled OLS
      • ARIMA Model
      • reshaping OECD panel data with not unique within i...
      • Combining multiple observations with same unique I...
      • Panel Cointegration for data with gaps in the time...
      • Trouble Exporting a Table 1 Into a PDF Directly Fr...
      • Creating Annual/Yearly Variable
      • Question (Omitted for multicollinearity)
      • Spatial Panel Data and Spatial Weight Matrix
      • Getting selected variables from cvlasso
      • How to do a special histogram like this in Stata?
      • Create change variable for timeseries data.
      • combine Several observations to one observation in...
      • Omitted variable in logistic regression
      • Tabout+graph dummy variables
      • help with stsplit in survival analysis with time-v...
      • Sem with logistic regression
      • How do I fill in missing values using the highest/...
      • Condition command stata
      • How to generate a new variable based on conditions...
      • cummulative change
      • How to remove the invisible space in the tail of a...
      • Quick question on xtreg
      • Accessing function output that's displayed but not...
      • Convert "string" ID to numeric with non-numeric ch...
      • Error: "numlist in operator invalid" while running...
      • Creating a lead variable for fixed effect regressions
      • Restricting Observations
      • first letters of each element
      • Adding independent variables to xtlogit
      • Problem with the data form a multi-line Excel cell
      • Panel methods accounting for both cross-sectional ...
      • Calculating top and bottom 2.5%
      • xtqreg warning message: fitted values of the scale...
      • Both fixed effect and first difference of some ind...
      • Test the difference of coefficients?
      • Calculating skewness and kurtosis of monthly returns
      • Panel data is not possible
      • Instrument variable model in binary outcome panel ...
      • Could you please help with coding "mixed-effects m...
      • Could you please help with coding "mixed-effects m...
    • ►  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