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
Merging two datasets to calculate an amount of days between two datesDear Statalisters, I'd like my data to be confidential so please forgive me if I remain vague durin…
Milliseconds inconsistent when trying to find the earliest date/time across variablesDespite reviewing help datetime, searching Statalist, and reaching out to colleagues, I cannot solve…
Loop for variable creationHi, Following is snapshot of the data Below is the dataex of what I currently have Code: * Exampl…
Showing values that exist in a value label but are not taken on by a variable in a table/tabulation?Hi All, I have a variable that represents the answers to the following question on a survey: Do you…
multiple random sample from a dataI created a data with 100,000 obs with uniform distribution and also created information for educati…
Subscribe to:
Post Comments (Atom)
0 Response to Trend test in Stata
Post a Comment