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

modelling costs with meglm: error message on zero values

My dataset has repeated observations on patients with patient-level costs captured at regular intervals over a period of time. I model how these costs vary over time using time-invariant patient...

View Article


How to calculate predicted probabilities

I'm currently using the margins command to make predicted probabilites (margins, at (variable) atmeans). My question, which I guess is fairly simple to answer for more experienced users of Stata, is...

View Article


Run time for estimating variance matrix in user-written MLE context

Colleagues, I have written an MLE routine that is quite time intensive. I've improved it as best I can, but I have recently realized that estimating the variance-covariance matrix consumes about half...

View Article

forvalues arguments

I can start a -forvalues- command with literal numbers as arguments forvalues 1/10 { but apparently not with builtin variables forvalues 1/_N { because that is a syntax error. Is there any way to get...

View Article

forvalues loop drops a variable after completion

I wanted to run separate regression across firms and years on two variables - "stockreturn" and "marketreturn" - to find the residuals and fitted values. I tried to do it using a forvalue loop but in...

View Article


combination of propensity score matching with IV

Hi Everyone! I'm currently thinking about a research question and I would like to have your appreciation of the estimation strategy I use. I have a cross sectional database and I want to analyze the...

View Article

Non Linear regression

I am currently working with non linear regression specifically logistic function. The problem i am facing is that after stating the initial values the outputs remain the same as the default one. The...

View Article

QQ plot age residuals

Hi guys, I'm trying to construct a QQ-plot for age and residuals using the following code: Code: gen residuals=HRQoL-HRQoL_predicted qqplot age residuals This gives me a normal looking QQ plot with a...

View Article


Time fixed effects in

I want to run a fixed effects regression with time effects in the following way: fixed.time <- plm(formula=y ~ x1 + x2 + x3 + factor(t), data=total, index=c("i","t"), model="within") However, if I...

View Article


Mixed vs random effects model

Hi Members, Can you please tell me how I can write a random effects command line which corresponds to the mixed effects command line below? I don't know how to write the code after ||. thanks, Mohamud...

View Article

No observations - Rolling -

Hi, I am trying to come up with the rolling window (4 quarters) out-of-sample forecast of the variable "change_UR" given the regression: regress change_UR L.Adv_GDP L.L2_Earn L.L1_MktRet I am trying to...

View Article

Combine date and time - time is wrong after conversion

Dear all, I am dealing with an apparently easy task. I am trying to combine in one column of date-time, two separate columns containing respectively a date and a time. The date is stored in date format...

View Article

Out of sample rolling estimation &quot;k&quot; periods ahead

Hi, I am trying to perform a rolling-window estimation t+k period ahead. I am using the command "rolling" and I have managed to get an estimation for k=1 only. How can I add k=2, k=3 etc... I am using...

View Article


Java Utilities

For anyone interested in using the Java API, I've set up a new repository with cleaner versions of some of the classes/methods I've built out to use the API. A fair amount of the classes are derived...

View Article

Stata ARMA multiple analysis

Hi all, I am writing my thesis but i am having some issues by estimating the variance of the income. i have a big dataset (Panel data: 4 years, 2600 householders - every household has 1 observation for...

View Article


Help with areg v.s reg

Hello, I just discovered the areg command, and I wanted to check that my use of it is correct. If for instance I estimate the model reg hprice bed baths garden i.district, cluster(district) Then I...

View Article

Non Linear regression

I am currently working with non linear regression specifically logistic function. The problem i am facing is that after stating the initial values the outputs remain the same as the default one. The...

View Article


Varlist and regression coefficient

Hi, I am trying to make my code more flexible using macro varlist since I would like to use various combinations of independent variables. Here is an example of what I'm trying to do: Code: use...

View Article

Identification of second-order CFA

I am trying to estimate a second-order CFA model. The second-order factor, A, has two first-order factors, B and C. B and C each have eight items. I am aware that a second-order model with two...

View Article

how to compute the number of distinct observations

Hi all, I try to compute the number of distinct observations of a variable: gvkey. I referred to this link: http://www.stata.com/support/faqs/da...t-observations. And I coded as follows. by execid...

View Article
Browsing all 72756 articles
Browse latest View live


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