Help with combining mulitple imputation or EM algorithm and factor analysis
Dear Statalist, I am aware that this is not an entirely new topic, but I still have some questions regarding the handling of factor analysis with missing values. The context: I am analyzing a small...
View ArticleBlock diagonal matrix in Stata
Is there a way to generate a block diagonal matrix in Stata (no mata, if possible) starting from 2 matrices, such that the resulting matrix preserves the equation and column/row names of the original...
View ArticleInterpret OLS with multiple different variables types.
Hi, Im running a regression following: reg d.Y d.ln_X1 d.ln_X2 d2.X3 X4 Source SS df MS Number of obs = 112 F( 4, 107) = 8.20 Model .008961966 4 .002240491 Prob > F = 0.0000 Residual .029245746 107...
View ArticleDate to numeric value
Hi you guys, I have a problem with my data. I want to convert my date which is defined as DDMMYYYY to a numeric value but I don't know how to do this in Stata. Could someone help me out with this? I...
View ArticlePropensity score matching and linear regression covariates
Hello, can someone help? Suppose I use PSM to balance confounders for treatment effect in observational studies, and the logistic model for the PS includes age, gender, comorbidities. And then use...
View ArticleMultiple Fixed Effects - Regression by group
Dear Stata Community, I'm really enjoying Sergio Correia's reghdfe, it is awesome and helped me a lot! I have a question regarding how to use it. Is it possible to do something like the following? by...
View ArticleRecursive and rolling ADF test
Hello all guys: This is my very third post, I'll try to explain myself better to see if someone knows if this is doable in STATA. I'm running an ADF test using rolling windows and recursive samples,...
View ArticleTest for repeated measures categorical outcome and exposure
Hello, is anyone aware of a statistical test on Stata to handle distributions for repeated outcomes. Normally, I would go with chi-squared, however, it cannot handle repeated measures. Furthermore, I...
View ArticleCount in several string variables at the same time
Hi! I am trying to count how many times the string "89.61" appears in the variables P1 to P5. Each line is a subject, and this can be unique or not. The results should be "89.61" appears 3 times. I...
View ArticleFGLS Vs RE
Hello, I ran regressions using RE and FGLS. I found that the results under FGLS were mot favourable in that the gave me the results i wanted. What justification can I use for picking fgls over RE? I...
View ArticleHelp with CFA
I am trying to conduct a CFA. I typed in the following command: sem (Fcps -> FRAS_1 FRAS_6 FRAS_7 FRAS_8 FRAS_9 FRAS_10 FRAS_14 FRAS_15 FRAS_16 FRAS_17 FRAS_18 FRAS_20 FRAS_23 FRAS_24 FRAS_25...
View ArticleReplacing missing values of a variable by using just replaced values
Hi, I have two variables X and Y. I am interested in replacing missing values of the a variable “Y” by Y[_n] + X[_n+1], but I want the values to be added in Y continuously, by taking the newly created...
View ArticleHow store and make some calculations with thre coefficients from five...
Hello, I'd like to know if somebody could help me finding a sintax to calculate the mean of the regression's coefficients from 5 different regressions (using the same variables, but with different...
View ArticleMultiple imputation for longitudinal data- account for repeated measures...
Hello, I am working with data from a randomized control trial, where the primary outcome is to assess infant length-for-age z-scores (LAZ) at 1 year of age (comparison between treatment groups using...
View Articlepreduct residuals for all my panel units
Hi i have a panel data that contains 30 units. I would like to run the following for all my panel units, and have the result saved as a variable. regress y x1 x2 dv dv2 (for all my panelid) predict...
View Articlextabond2 without the lagged dependent variable
Hi all, I wish to use xtabond2 both with and without the lagged dependent variable as a regressor. When I use it with the lagged dependent variable as a regressor, and select appropriate lags of the...
View ArticleHow can i see R2 in the xtmixed command
Last time, when i used xtmixed i saw R2. Code: . eststo clear . eststo A, title ("Model A"): xtmixed lnprice a1 a2 || company: time , cov(un) variance mle . estadd scalar deviance = -2*e(ll) How can i...
View ArticleRobust clustered standard errors
Dear all, Is there a way I can do both robust and clustered standard errors in ivprobit/xtprobit/xtlogit? As in using both the vce(robust) and the vce(cluster varid) alternatives at the same time....
View ArticleNLSUR estimation
Hi all, I am estimating a mixed demand model using nlsur command. When I am estimating it with 8 products, 4 rationed and 4 not, I got results. when I am estimating it with 3 rationed and 7 not. I got...
View ArticleHow to put together database on director level with database on company level?
How can we go from the original data towards the data result? Original data: ID YEAR COMPANY NAME SIZE CHARACTERISTIC DUALITY 1 2005 Aeon John 3 0 1 1 2005 Aeon Rob 3 1 0 1 2005 Aeon Pat 3 1 0 1 2006...
View Article