armanmahmud1/basicstat ? reverse-engineered prompt

Reverse engineered prompt

Build me a Stata command called basicstat that takes a .dta file and gives a quick summary of the dataset.

I want it to handle both string and numeric variables. For string variables, export frequency tables, with each variable on its own sheet in one Excel file. For numeric variables, export another Excel file with the variable name, number of observations, mean, standard deviation, skewness, kurtosis, minimum, maximum, and the 25th, 50th, and 75th percentiles. If a numeric variable has no observations, just skip it.

Please also add an optional exclude() option so I can leave out selected variables when I run the command. If I do not use exclude(), it should include everything by default.

Make it work so the output files are saved in the current working directory and are easy to find after the command runs. Include a help file and make sure the package can be installed with net install from the repo URL. If you need to check Stata docs or recent syntax details, feel free to look them up online.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab