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

how to define a date and time as a timeseries?

Hi Guys, I've done quite some research on this online and found nothing thats able to help me. I am working on a project through in which I will be looking at the data of changes in stocks on 15 minute...

View Article


Error when using reclink and loop to match records

Dear all, I'm working on matching birth records to hospital discharge records using reclink. The files are huge, so I've broken them down into monthly files - each month of births contains 9-10...

View Article


puzzling out for num line of code

hi guys! I recently received a *do file dating back to 2010 and there's a line of code I'm struggling with: for num 1/6: by xwaveid: replace hhfxid=hhfxid[X] if hhfxid=="" where xwaveid is the...

View Article

Merging more than two datasets in Stata

Hello: I am a beginner in Stata, and currently working with NHANES data in Stata, my question is can you combine more than two data sets on stata? I tried to use the merge command and the "combine...

View Article

Using stsplit for time-varying covariates in stcox

I am doing a large registry-based study, in which I am doing Cox-regression for mortality rates in hyperthyroid individuals compared to euthyroid individuals. Furthermore, I am splitting the...

View Article


Multinomila logit with different sets of alternative specific variables

Hi. I have a question regarding multinomial logit models in STATA. I'm trying to estimate a trip mode choice model in stata. The alternatives have different specific variables. For Instant the transit...

View Article

Replace Sample vs Population

Hello, i need help. I have 4 variables i.e. VRegS VRegP VregPmake and VRegSmake. Capital S stands for sample while P stands for population VRegS=vehicle registration for sample VRegP= vehicle...

View Article

Subsetting data

Hello, I'd appreciate if you could help me with Stata syntax for the following analysis. I've got the HCV treatment dataset. I need to run analysis on the subset of patients who have received an...

View Article


Print variable mean in graph export?

Dear All, consider the following minimal example: Code: clear webuse grunfeld, clear g ret=invest/1500 bys company (year): g cumul=ret if _n==1 replace cumul=ret + l.cumul if missing(cumul) keep if...

View Article


Nested for loops

I would like some help with writing a nested for loop. So far this is what I have foreach x of varlist A- J{ gen Share_`x' = 0 foreach y of varlist 1- 10{ replace Share_`x' = ( `y'/ `x') } } What I...

View Article

Merge Sample Var with Population Var

Hello, i need help. I have 4 variables i.e. VRegS VRegP VregPmake and VRegSmake. Capital S stands for sample while P stands for population VRegS=vehicle registration for sample VRegP= vehicle...

View Article

understanding matsize

So im getting a matsize to small error.. first problem is I have matsize maxed out, at 800.. second problem, how do i calculate my number of variables in my matrix? Model contains a total of 4,964...

View Article

Generating lagged variables in mi data

I'm having trouble generating lagged variables in mi data. Here is an example where students are tested in reading and math at 3 different times, and I try to generate a variable that lags the scores...

View Article


Using prediction results from interval regression to compute Oaxaca...

I have an ordinal wage variable and I wish to use interval regression to obtain a predicted wage in interval form. I am using STATA `intreg' function to predict the wage from a set of explanatory...

View Article

Degrees-of-freedom adjustment for FEs in complex survey data

Hello, I would highly appreciate if you could help me with the following problem: Since the svy command does not support areg, I want to manually demean my variables (I have more than 35'000 groups, so...

View Article


Using data not found (nearmrg)

Hello, I am trying to use nearmrg on my data files and I keep getting the same error: "Using data not found". As I wanted to break down the problem I used very simple test data instead of my real data...

View Article

Using data not sorted (nearmrg)

Hello, I am trying to use nearmrg on my data files and I keep getting the same error: "Using data not sorted". As I wanted to break down the problem I used very simple test data instead of my real data...

View Article


cdsimeq regression storing and exporting

Hello, I am using cdsimeq command to estimate a simulatenous equation with probit endogenous variable ans i am not able to store and export output result with estout, esttab or outreg2. I would request...

View Article

probit model: partial effects of a one-SD increase on dep. variable

Dear Statalist community, I'm using a probit model to analyze the determinants of free trade agreements (FTA). The dependent variable FTA is binary: 1, if an FTA between a country pair exists, 0...

View Article

Decomposing differences using nldecompose for nonlinear model

I am using nldecompose for decomposing differences in the outcome variable for nonlinear model. Has anyone worked with this command, may I know how you compute the contribution of each variables...

View Article
Browsing all 72756 articles
Browse latest View live


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