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

Longitudinal data analysis

I am analyzing a data set of before/after biomarker values in 2 groups. I have baseline continuous characteristic variables for samples in both groups which I'd like to include in some models and...

View Article


Append multiple datasets

Hi I have multiple data sets in Excel, each excel file contains the data of air -pollution of each month for the same clusters(ranging from 1 to 980) example data March 2000. Code: * Example generated...

View Article


HELP: Generating new variables based on string entires

Hello, I am currently trying to generate a new variable "month" and "year" based on an existing string variable labeled "id" that depicts the file name where the data row comes from (see the attached...

View Article

help with boottest

I installed boottest but when I try to run it on the sample data from STATA, I get type mismatch... see below . net install boottest checking boottest consistency and verifying not already installed......

View Article

HELP: Deleted Rows from Appending Datasets

Hello I have appended several datasets together, the issue being that each dataset had rows labeling its respective variable (see row 3 of the attached imaged). Rows like these are reoccuring...

View Article


HELP: Applying Conditions to Variable

Hello-- In the attached image you will see column 1 with county name with gaps in the dataset. I was curious if there was a way (on STATA) to copy "Alcona" (for example) down to rows 1-5, so that...

View Article

display quotation marks in latex

Dear all, I would like to make a macro such that I can type in latex something between `` and ". The current state of my code is something like this: Code: local say = "There is too much noise." file...

View Article

local and conditionals

Dear all, I am having troubles with some macros. My peace of code is Code: foreach ETC in $ETC{ preserve keep if ETC=="`ETC'" if etc[1] == "Bogotá"{ local Nombre = "Bogotá, D.C" } if etc[1] ==...

View Article


Importing Excel Files into stata

Hi I am using these commands to import the excel files and save them into stata. but I am getting the error can anyone please help me to correct the issue. local mylist 03 04 05 06 07 08 09 10 11 12...

View Article


Importing Several Excel Ranges from different Excel files onto Stata (for...

Hello Stata gurus, This is my first post on Statlist and I am currently attempting to import excel ranges from different excel files onto Stata (for appending). Anyone have any suggestions on the best...

View Article

Saving the country graphs by their names (in a loop)

Hi... I have created a code that titles the graphs by their "id". I want to title the graphs by their names. Here is the code: Code: foreach i of numlist 1/5{ use wdi_fhp, clear keep if id==`i' tab id...

View Article

Likely a very simple question: what is the syntax for adjusting the y axis...

Greetings, I'm running Stata 15 on OSX. I'm struggling to figure out how to adjust the position of the y-axis title without resorting to the Graph editor. I initially tried yscale(, titlegap()) but...

View Article

R(2000) error in clogithet regression

I have two subgroups of respondents: the ones who saw traffic-light labelling and the ones who did not. I am using likelihood ratio test to see if there is any difference in separating them into two...

View Article


dropping observations

Hi b1 is month of birth and b2 is year of birth. I want to drop all the observations below March 2000. How I can do that, please Code: * Example generated by -dataex-. To install: ssc install dataex...

View Article

Question for controlling the variables reported in a regression table

My question is a two parter -I am attempting the below regression using twelve controls. Is it possible to represent these twelve variables into a vector, let's say "X". I tried to generate a new...

View Article


Merging two data sets within a window

Hi, A snapshot of a randomly generated dataset looking as mine is as follows Code: clear input int fid str10 enquiry_date str13 short_name float loan_date 171 "18-12-1975" "B1" 5830 20 "31-01-1987"...

View Article

Changing matrix entries to 1

Hello, I am trying to edit a spatial weighting matrix created by the spmatrix create command in Stata. I would like to replace all the non-zero entries (>0) with 1, but this seems to not be working....

View Article


MLE and log likelihood function

Here, Y = {y1, y2, ..., y10} = {10, 9, 21, 4, 14, 11, 22, 9, 6, 4}. Using the (log-)likelihood function, how I can demonstrate the maximum likelihood estimation in STATA ?

View Article

How to draw a volcano plot using stata

i always use stata analyze data,and I'm new to the R language,who can tell me is any package in stata which likes volcano plot ?thanks

View Article

Create a loop for a one step ahead out-of-sample analisys

Good morning everybody, I would like to create a kind of loop to perform and out-of-sample analysis for my monthly data adding one more observation each time for the forecats (one step ahead forecats)....

View Article
Browsing all 73291 articles
Browse latest View live


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