Quantcast
Channel: Statalist
Browsing all 72758 articles
Browse latest View live

Wildcards with strpos/regexr

Could someone give me an example on using a wildcard with strpos and regexr ? For example, I want to scan a string variable (with multiple words) called meds for nu seal, nu-seal and nuseal, (or...

View Article


Kruskal–Wallis one-way analysis of variance

Hello everyone, I am bothered by a question regarding group differences in my data set. I have a dataset with variables (ordinal, dummy, and intervall) from 10 different communities. I want to run...

View Article


Extremes

Hi everyone I have a big dataset, with 280 variables (made a global varlist with all of them). I need to identify whether if there are strange extreme values so as to drop them I have read about it and...

View Article

Codetest

Hey, the following commands: : by InsurantNumber: replace _id

View Article

bysort produces different results everytime

Hello, I have a strange problem. I am using the following code to count the unique visits of an insurant/patient (via DispensingDate). InsurantNumber is unique to a patient and to a doctor, meaning one...

View Article


DHS WEIGHT

Hello, Please I need your suggestions. I want to use data of DHS to analyse the effect of the consommation of a product on the probability to work. Unfortunately, I have only 100 people who consume the...

View Article

Cluster analysis with mixed data

Dear Statalisters, I want to do (hierarchical) cluster analysis with a data set that contains one continuous variable (age) and data from a few multiple response questions (with dummys for each option...

View Article

Merge loop over different variables

Hi everyone! I am trying to merge two datasets (household surveys) but I would like to create something like a loop so if the first group of variables don't create a match, Stata should try merging the...

View Article


Consistency between appearance of graphs in window and when exported

Dear Statalist, I would like to know how to maximize the similarity in appearance of graphs as they appear in the graph window and as they appear when exported, in particular to PDF. Font sizes, etc.,...

View Article


tabulate with weighed data

Hello, I have a simple question. I have a dataset that is weighed according to a specific variable. Let's say when I do a simple tab, I write svy: tab X Y. Now I would like to tabulate two variables...

View Article

Poisson inverse cumulative distribution function that returns k instead of m?

Hello, Stata's invpoisson() function "returns the Poisson mean such that the cumulative Poisson distribution evaluated at k is p: if poisson(m,k) = p, then invpoisson(k,p) = m," according to the user...

View Article

Fixed Effects in Stata

Dear All, I have a panel data with missing observations. I run the following regression: reg y x and tsset id time xtreg y x The number of observations is the same in both regressions. My question is:...

View Article

Synth: Pre/post MSPE

Dear all I have problem calculating the Post(event)-MSPE in the placebo analysis. I am student at the Norwegian School of Economics and I am writing my master thesis using the synthetic control method...

View Article


Choice of residuals to use in Two Stage Residual Inclusion strategy with...

Dear Stata-listers, I write to ask your opinion regarding which type of residual to use in a 2SRI strategy with a first stage Poisson regression. I want to estimate a linear model where there could be...

View Article

Plotting predicted number of events from negative binomial panel regression

Dear Statalist members, I'm trying to plot the number of predicted events per month over time for different age groups, based on a negative binomial regression model. My general coding procedure, after...

View Article


Is there a combination of xtscc and xtregar?

Dear Statalist, I need to do a regression on a panel dataset (N=19 countries, T=32 year, balanced). My problem is that the data suffers from contemporary correlation as well as a unit root in the...

View Article

"added_text_option" in scatter not working

Hi, I use stata 12 on a mac and do have issues with the added text option in a scatter graph. This is my code: scatter c diff_PL_125 [w=population], msymbol(Oh) xline(0) text(120.78 -36.21 "China...

View Article


String variables functions

Hello everyone, I have a dataset with a string variable like this: name Duomo (1) Brera (2) Giardini Porta Venezia (3) Guastalla (4) Vigentina (5) Ticinese (6) Magenta - S. Vittore (7) I want to create...

View Article

Second Generation Panel Data estimation

Hey Stata Experts, I am trying to estimate panel data using second generation panel data technique, here is the command i am running xtpmg d.pcgdp d.pcoda d.pcfdi d. inv d.cor d.tr d.le, lr( l.pcgdp...

View Article

problem in reshaping data

Hello! I have panel data in long format on mergers and acquisitions: acquirers, (uniquely identified by their cusip ("acusip")) that made several acquisitions in the course of time. Targets are also...

View Article
Browsing all 72758 articles
Browse latest View live


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