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

Compressing several loops

Hi all, I have the 16 loops below, that I want to compress it: HTML Code: mat Y = J(21, 32, .) forvalues i=1/21 { qui sum x if c`i'==1 & a1==1 matrix Y[`i',1] = r(min) matrix Y[`i',2] = r(max) }...

View Article


transposing rows to columns

Hi, My data contains multiple observations for the variable Dealsubtype, whereas I want to change the layout to be dealsubtype 1, dealsubtype 2, dealsubtype 3, etc.. Is there an easy way to transpose...

View Article


nearest neighbor matching

Dear all, I know that there are a lot of topics on this matter, but unfortunately I cant figure out how to do it in my particular case. This is my last resort, I really hope somebody can help me out. I...

View Article

Trying to use pvarsoc to select lag for my pvar but error arise

I'm trying to analyze panel var model and want to select appropriate lag order for my data. But pvarsoc code doesn"t work for me. Even if I tried with example data from help pvarsoc, there is always...

View Article

Merging few observations to copy/add for other observations

Hello, I am relative to Stata and I just cannot figure out how to solve the following problem. My master data set contains household information and my using data contains numbers of events per...

View Article


twopm: Two Part Models

I am using Stata 15 MP and my analytic data set is a geographic region-year panel, for the years 2000-2011, and 48 African countries (n=8,928). I am estimating a two part model using the twopm command....

View Article

Different marginal effect for dummy variable after logit, depending on using...

Hello, I'm wondering why margins (after logit) produces different results for a dummy variable (0-1) depending on whether the i-prefix is used or not. Estimates of coefficients of smoke are (logically)...

View Article

Change date variable to one stata can read

Hello Statalist, I've a question regarding my dataset. I want to extract the year and month separate from my "first_payment_date" variable but nothing seems to work. I have uploaded an attachment to...

View Article


gologit2 suddenly having problems in Stata 15

I have sent this problem to Stata tech support. I will be amazed if anyone on the list can help me but I figured I would toss it out just in case anyone has encountered a similar problem. My gologit2...

View Article


Image may be NSFW.
Clik here to view.

R squared - Negative binomial

Hello everyone! I am currently performing some negative binomial regressions (xtnreg) with my panel data. I tried to measure the R squared but it seems that it is not really common when using a...

View Article

Checking for Hetro in Longitudinal (Panel) Data

Good Day, I am trying to check for hetro issue in my longitudinal data where the N is large and P is small. I have run the following command: xtgls mig_dummy lagSPEI i.age_cat i.Gender , igls...

View Article

time variable mistake

Hi, I have a balanced panel data set with data, for each cross-section, up until 2016 (i=10, t=147). tsreport reveals that I have 9 gaps. tsreport, detail reveals that all gaps are at the Start of...

View Article

Linear panel data: imposing MA(6) correlation errors

Hello Statalist! I'm doing an exercise from Microeconometrics Using Stata, by Cameron and Trivedi, Exercise 3 of Chapter 8 (page 278). "For the model and data of section 8.4, compare PFGLS estimators...

View Article


Not displaying the F-Statistics and and Prob value when using robust command

Dear Statalist, I am having an balanced panel data set (banks profitability determinants factors) and using Fixed Effects with time dummy (after using testparm command). I run the multiple regression...

View Article

Marginsplot not working

I would like to display a plot with the average marginal effect of nb_ygsibs5 with 95% CIs. This is what I do : Code: reg mort5 nb_ygsibs5 nb_ygsibs_fem female urban yob RBR birth_sp yobm twin educlvl...

View Article


variable X not found in list of covariates

I have already read a lot of topic about this issue, but nothing has worked. I have my database with some variable. I want to calculate the marginal effect of W for a person with some characteristics....

View Article

Factor variables may not contain noninteger values (r452)

Dear all, I have a longitudinal panel dataset and I am trying to add individual fixed effects to my specification with i.idd. idd identifies unique individuals throughout the years. When I add i.idd to...

View Article


Delete Observations that have no partners in panel data

Hello.. i am new in here i got some problem in using STATA i am trying to make panel data but not every observations have complete year data -------------------------------------- copies | observations...

View Article

Confusion About Reduced-Form Estimation

I'm using Stata 14 for Mac and I'm exploring a data set. It was going well but I've hit a wall. The question is phrased as such: "Estimate the hours equation as a standard Tobit model (Tobit I) on the...

View Article

HotDeck results not reproducible

Hi everyone, I'm imputing data using HotDeck. gen income1 = income if treat == 0 hotdeck income1, store by(eligible) seed(1) impute(5) keep(income1 householdid) merge 1:1 householdid using...

View Article
Browsing all 73250 articles
Browse latest View live


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