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

Why can't I convert variables from string to numeric?

I've imported the data from excel, there the data was numeric. While importing it, Stata recognizes it as strings and gives no reaction when I try to convert it. Please, can anyone help me?? What the...

View Article


Calculating RR for categorical variable

Hello, I'm a Stata novice and have several categorical variables but only know how to get an OR for them (using tabodds). Can anyone explain how to go about finding an RR for these? Thank you!

View Article


Regression for multiple dependent variables

Hi, I have a 3 dependent-2 independent variable regression model. I used MANOVA and MVREG after that. My data set is panel where i=1...,17 t=1990...,2015 Could you please advice me whether the method I...

View Article

how can I reproduce this figure?

sddArray

View Article

Question on nlogit

Dear Statalisters, I am trying to do a location analysis using nlogit, which will be compared with asclogit later. Due to the large choice set (800 in one nest, say A nest; and 208 in another nest, say...

View Article


Imputation with overlapping spells

Hello, I am trying to impute the panel-structured data linearly using the closest data points that are non-missing. The problem arises due to the overlapping spells. For example, for the first...

View Article

Instrument in GMM

Hello everyone, I'm running gmm model, I have a question is I can use instrument variables outside. Like example: My command is: xtabond2 Y l.Y X1 X2 X3 X4, gmm( l.Y, lag(1 1)) iv( X1 X2 X6 ) Here, I...

View Article

How do I code my own likelihood function for this kind of a problem.

I am trying to fit a Poisson regression model using my own likelihood function. I have seen the basic example of how I would do it but the thing is that my function has several if statements that makes...

View Article


String variable values as (part of the) names of scalars

Dear Stata users, I would really appreciate some help on the following issue. Before that, my apologies if it has already been solved somewhere else, and I did not notice it. Suppose that we have a...

View Article


Loop only considers first observation

Hi all, I am running the following code: Code: local timediff = difftime forvalues i=1/8730{ qui gen difftime`i' =. if `timediff' > 0 { qui replace difftime`i' = timeid + `timediff' } else { qui...

View Article

repeated time values within panel

hi everyone, i have a problem to set data as panel. when I type xtset IDProd grupdate, the stata says repeated time values within panel I use group(IDProd) and group(grupdate) to make sure that there...

View Article

How to detect the quantile coefficients are significant?

Dear all, I have estimate coefficients for all quantiles. Now i am plotting coefficients and corresponding confidence interval (95 percent). As in linear regression, we can say whether a coefficient is...

View Article

Image may be NSFW.
Clik here to view.

xsca(log) command on foresplot skews data to the right, help?

Graphing ORs for a study, looks fine so far: Array However, when I try to convert the x-axis to a log scale using the xsca(log) command, all my data gets crowded to the right. 8zq6tlh.png Help, please?...

View Article


Importing JSON data using insheetjson

Dear all, I'm trying to import data through an API that outputs JSON. My problem is the format of the file:...

View Article

Calculation using fixed future time interval from a specific observations

Dear Statalist members, I really appreciate the help statalist provides and it already has solved a lot of my problems. Thank you for that. However, currently I am struggling to fix a calculation over...

View Article


rare case regression analysis with binary independent variable

Hello, I'm working on the question if 11-12 years old pupils feel disadvantaged by their teachers depending on their social class. I'm using Stata with G-SOEP data to find an empirical answer for my...

View Article

Difference between heckman and eregress command

Dear Stata Users, Stata15 add the extended regression command to its arsenal. According to ERM manual, -eregress- provides features of some existing command, -heckman- for example. But when I implement...

View Article


Quantile regression, survey data and weights

Dear all, I quick question relating to multiply imputed survey data, quantile regression and how to take into account sample weights. STATA 14 does not provide a possibility to deal with multiple...

View Article

Dose response meta regression, metareg versus glst

Dear all, My question is about the appropriateness of using metareg for a dose response meta regression given the limitation that glst requires further data that exclude half of my studies. Im carrying...

View Article

multilevel GSEM interaction model

I've been running a multilevel GSEM model with 2 independent latent variables one measured with 5 items and the other measured with 6 and an interaction latent variable with 30 indicators and specific...

View Article
Browsing all 73518 articles
Browse latest View live


Latest Images

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