I currently have a dataset that contains several participants with multiple dependent variables represented by the means of the participants trials. The dependent variables are split into 6 levels each represented by a column and single value for each participant. These levels correspond to the 2 independent variables I am focused on, one having 3 factors and one having 2. I am attempting to perform repeated measures ANOVAs using the PROC GLM command in SAS On Demand, however I have been having trouble getting the code to return anything useful. The table below is an example of one of the dependent variables in the dataset. I would like to conduct multiple factorial repeated measures ANOVAs on each of my dependents and their 6 total factors. Can anyone give me some guidance? The questions I am struggling with are how to conduct the PROC GLM without having a CLASS statement, and how to test for homogeneity of variance using something like Levene's test?
Subject
Dep1 (1_1)
Dep1 (1_2)
Dep1 (2_1)
Dep1 (2_2)
Dep1 (3_1)
Dep1 (3_2)
1
value
value
value
value
value
value
2
value
value
value
value
value
value
Related
I am using SAS proc surveyfreq with jack-knife replicate weights to describe frequencies across variables in a survey that used address based sampling. Some of the variables are coded by individual selection - for example, a survey question asks respondents to pick three top choices, so the actual dataset made each individual choice a variable with a Yes/No 0/1 response. Which SAS procedure that incorporate jk weights should I use in this case to describe the frequency for the entire question for the three top choices?
I am working on a multicenter propensity matched cohort study. The primary outcome is binary while the secondary outcome is continuous. First I performed multiple imputation to address the missing data. I initially planned exact matching on the sites in addition to matching on other variables of interests but got very poor matches. Then I used variables that described the characteristics of the sites, which I compared with the site variable using c statistic and they had similar values. With this new variables and the other variables of interest I got a much better match. I then performed within imputation conditional logistic regression for the binary variable and pulled the results. For the secondary outcome I used negative binomial regression including the match ID in the class statement and as a repeated statement. Do I need to include 'site' as a random statement in the model? I don't know if this is possible in conditional logistic regression. What would be the best way to model this data after matching? For this study I used SAS for analysis.
I have data that I would like to rank by two separate categories, State and ServiceType. Essentially, there are multiple years of data for each ServiceType across various states, and I was hoping to get the sum of all years for each ServiceType by State, meaning each State is treated independently and the sums of the various categories are ranked only within that state, not nationally.
I've tried
bys State ServiceCategory (quant_variable): ///
egen rank_quant_variable= rank(sum(quant_variable)), field
as well as a version of above where I used a pre-calculated sum variable. Both don't really work.
This lacks a reproducible example, as you do not give your data or phrase your problem in terms of a dataset we could download, for example as loaded with or referred to in Stata. There is no need to give the full dataset but just a minimal example with the same structure.
The call to sum() here would be to Stata's sum() function, which yields the cumulative or running sum, which evidently isn't what you want. So that case is easy to dismiss.
The problem remaining is quite what you did in the code you don't show with a pre-calculated sum.
At a guess you worked out
bys State ServiceCategory: egen sum = total(quant_variable)
and then pushed that sum through rank(). But that would use each value of sum as many times as it occurred.
Perhaps you want something more like this:
egen tag = tag(State ServiceCategory)
bysort State: egen rank_quant_variable = rank(sum) if tag, field
bysort State (rank): replace rank = rank[1]
But it's really hard (for me) to visualize this without details on what you did or an example to work on.
I have a continuous dependant variable (volume of chemical) with lots of values as 0 and a bunch of continuous and categorical predictors. I want to examine the relationship between predictors and the volume of chemicals. I was thinking of using multiple linear regression but many values in the outcome variable are 0. So, I am not sure how I should proceed.
I am using SAS.
Possibly related to this question: How can I print odds ratios as part of the results of a GENMOD procedure?
I am dealing with a wide dataset containing; a main exposure variable, a categorical variable Type (four levels), as several continuous and binary variables as confounding factors.
Additional info: The dataset contains multiple imputations.
I am using the following code:
Proc genmod;
Class ID Type (ref=first)
Model class1= Type;
estimate 'black' TYPE 0 1 1/exp;
estimate 'white' TYPE 1 0 1/exp;
estimate 'red' TYPE 0 1 0/exp;
Repeated ID;
By imputation;
Run;
I expected the results table to contain, among others, the beta for the exponential of every level of the categorical variable Type ( bar that variable's reference group). The actual results table lacks beta values, nor does the table have confidence intervals printed.
What syntax should I use to tell SAS to produce those numbers in the results? I have looked through SAS documentation, but I have yet found an answer.