I need help with looping in mata. I have to write a code for Beta coefficients for OLS in mata through loop. I am not sure how to call for the variables and create the code. Here is what I have so far.
foreach j of local X { if { //for X'X matrix XX = [mata:XX = cross(X,1 , X,1) XX] } else {mata:Xy = cross(X,1 , y,0) Xy }
Related Posts with Looping for Variance beta
two-stage multinomial logistic regression (mlogit-->logit)Hello, I want to try to analyze the data in two stages where step 1 uses multinomial logit (3 catego…
RESET Test after running logistic regressionHello, I was informed by my thesis supervisor that I should consider conducting a RESET test. I hav…
latent class model with predicted probabilities?I have a question that I can't find the answer to. I have a latent class model with covariates, esse…
Creating a variable by finding correlations of two other variablesHi everyone, I am trying to create a variable [pre], the value of which will be the correlation of …
About the import commandHi,I want to import an excel file to stata.When I use the import command in the do file,I encount a …
Subscribe to:
Post Comments (Atom)
0 Response to Looping for Variance beta
Post a Comment