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
How to specifiy dummy variables/ exporting multiregression to word document?Array So I'm running a multiregression on the effect that age plays on duration of unemployment. …
Ordered Probit PostestimationDear all Stata users, I have been trying to do postestimation for a ordered probit model for each o…
Present 3 regression models in a single tableI have done three regressions in STATA. All variables are same, but in the 'country_name' variable (…
How to drop year observations from a variableI am using V-dem version 6. In the year variable, observations begin from 1789. I want to use 'drop'…
merging variableshello. How do i merge a single variable from a using data set to the main data set? …
Subscribe to:
Post Comments (Atom)
0 Response to Trend test in Stata
Post a Comment