Hello,
I have been using Stata to analyse all of my data, however my supervisor has asked me to perform a trend test similar to SPSS' "linear-by-linear association" in crosstab>chi2.
I have two different things to test trends for:
1. test trend of a continuous variable (example age) across an ordered variable (quantiles in my case, score 1 2 3 4).
2. test trend for categorical variable (example type of diet - not ordered) across an ordered variable (again, same quantiles).
How do I perform these tests in Stata?
I have been using nptrend for 1. and thought it was correct but it doesn't give me the same output as in SPSS.
I have read the Stata article about trends, also tried the vwls command (again similar but not the same output as SPSS).
Is it okay to use nptrend in case 2. ?
Thank you for your help and time,
Céline (a beginner epidemiologist)
Related Posts with Trend test in Stata
Graph panel dataHi all, My name is Thomas Leirvik, and have a few questions about plotting using Stata (sorry for m…
construct a complete list of index components over different periods?Dear all, I find this question here. The data is (including some Chinese): Code: * Example generat…
Cross Sectional Dependence XTCD and XTCSDHi Everyone, Iam using CS-ARDL and CS-DL approaches. I already have estimated these approaches. How…
Variance & Covarance multilevel logit estimationDear All, I estimate a multilevel logit model using melogit. The result is reported below: Array …
Esttab returns just one variableHello everyone, so I run a pwcorr with about ten variables, in the next step I'm using esttab to ge…
Subscribe to:
Post Comments (Atom)
0 Response to Trend test in Stata
Post a Comment