Science topic

SAS - Science topic

Explore the latest questions and answers in SAS, and find SAS experts.
Questions related to SAS
  • asked a question related to SAS
Question
2 answers
Hello every one am writing my Msc research proposal.
My experiment will test three feed sources (pulses) as a bee feed supplement. The trials will be set out "Completely Randomized Design. Each treatment group of bees will be provided with 150 g of the respective treatment diets. The DATA data to be collected will be amount of food consumed, sealed brood and bee bread areas and bee strength and honey yield. Data will be subjected to ANOVA using SPSS software (version 28) with proc mixed model of SAS, and Mean values will be separated using to Duncan’s multiple range test (DMRT) at p =0.05 (SAS Institute, 2012).
Is there anyone who advised me whether my data analysis methods are appropriate or not.
Relevant answer
Answer
Dear Dr. Itsic
Thank you very much for taking your precious time and provide your intellectual comments. Concerning hive numbers 16 including control (4 hives for each treatment). The location is in one place. The pollen substitutes that will provided to each colony is 150 gm per week. The measures (amount of feed, sealed brood and bee strength and honey yield) for one season. Considering the aforementioned information shall I go for nested anova ?
  • asked a question related to SAS
Question
3 answers
Can you still have a good model despite a p-value < .05 for the H-L goodness of fit test? Any alternative testing in SAS or R?
Relevant answer
Answer
What if the p-value of the HL test doesn't appear? it just appeared as this code ".". what is that mean? thank you
  • asked a question related to SAS
Question
2 answers
I need SAS codes for cubic spline curves.
Relevant answer
Answer
why not using matlab to make cubic spline curve , that much easier and faster
  • asked a question related to SAS
Question
2 answers
My co-authors and I are trying to run a hierarchical model in SAS as part of a scale development project (a multi-dimensional scale with a higher-order latent factor). I am using code from a prior, published project - but we are getting some odd loadings in our model on specific items (e.g., a loading of 1.00 on one item ). Maybe we are mis-specifying something in our model. Can anyone recommend a consultant that we can hire? thanks.
Relevant answer
Answer
If you could post the output file for your model including the sample size and observed variable covariance & correlation matrix you may be able to get some useful answers for free.
  • asked a question related to SAS
Question
5 answers
We performed a meta analysis recently and SAS popped out an i=squared of exactly zero. I know this is theoretically possible but it doesn't make sense to me as the outcomes in the different studies in the analysis did not have the exact same means and variances. Can anyone shed light on this?
Thanking you all in advance for your thoughts.
Gary
Relevant answer
Answer
thanks again to all those responding. We double checked the code in Stata and I2 was = 0%. I also looked at the forest plots and Bastiaan's point about wide confidence intervals appears correct.
  • asked a question related to SAS
Question
1 answer
HI,
I am looking for ways to add a random effect in a SUR model, using R or SAS.
To be more specific, I have panel data measured at an individual-and-daily level, and I want to stack 3 equations with different dependent and independent variables in a SUR model, with an individual random-effect coefficient.
If you guys have any example codes that I can refer to, it would be a great help!
Thank you:)
Relevant answer
Answer
Looks like a great dissertation topic. David Booth
  • asked a question related to SAS
Question
3 answers
A research was carried out on broiler chickens, which is divided into two phases (starter and finisher). However, during the finisher phase, the birds were not redistributed, thereby necessitating the application of analysis of covariance when analysing the performance parameters at finisher phase, whereby the initial weight (IW) will be the covriate variable. The analysis was carried out using SPSS in the past, and was quite straightforward. However using the proc syntax on SAS for this proves difficult. I used the;
Proc GLM;
Class Enzyme Level;
Model FW TWG Av_FI FCR DFI Survival = Enzyme Level IW;
LSMeans Enzyme Level / StdErr Pdiff Adjust = Tukey;
Run;
which makes use of LSMeans for mean adjustment, but the result obtained is same as that obtained without covariate, and also different from that obtained from SPSS.
Could anyone kindly help out on the correct syntax, and/or the interpretation for ANCOVA using SAS proc?
The result obtained from SAS proc is attached.
Thank you
Relevant answer
Answer
I believe your model is written incorrectly. The DV SHOULD BE ON THE LEFT SIDE OF THE = Sign. See the attached screenshot example.
Best wishes David Booth
  • asked a question related to SAS
Question
4 answers
Dear Researchers,
How do we conduct a test of homogeneity variances (Bartlett's test) in combined analysis for years and locations for two factor factorial experiment.
Thanks..
Relevant answer
Answer
Follow Dr. Todd Grande's explanation about your query.(Google/Youtube)
Good suggestion I would totally agree with Abiodun Christian Ibiloye and Béatrice Marianne Ewalds-Kvist
  • asked a question related to SAS
Question
3 answers
I use the following SAS codes to draw survival curves:
proc lifetest data=MyData plots=survival(cb=hw test atrisk(maxlen=13)); time PYEAR * Outcome(0); strata Exposure; run;
Since the association is week, I need to customize the (y-axis) to show only between 0.8 and 1
Relevant answer
Answer
  • asked a question related to SAS
Question
7 answers
Dear all,
I want to analyze a factorial split-plot in time using SAS.
Factorial Experiment using Completely Randomized Design (CRD);
Factor A: treatments (a1-a4)
Factor B: harvest time, different days after treatment (b1-b5)
Replication: 3
Does anyone have SAS codes for this analysis?
Regards,
  • asked a question related to SAS
Question
3 answers
My advisor sent me the following code and told me to rewrite it in R.
proc nlin;
parms a=19 c=9 k=.08 lag=2;
*a=soluble, c=undegradable, k=rate/h, lag=lag time;
time=time-lag;
if time<0 then time=0;
b=100-a-c;
model DM=b*exp(-k*time)+c;
output out=temp p=Predicted r=Residual;
The non linear model was easy enough but I was having issues with fitting lag time. However I have written a function that works great, and I have posted it here so that it will hopefully help someone else in the future.
output1<-NULL
finaloutput<-NULL
degradfun<-function(x){
data1<-subset(DegradADJ, Subset_Term==x)
parms=list(b=100,k=0.04,c=0, lag=15)
#m<-nls(N_Disapp~b*exp(-k*(Hour-lag))+c,data=data1,start=parms)
m <- nls(formula = N_Disapp ~ ifelse(test = lag >= Hour, yes = b*exp(-k*(0))+c,
no = b*exp(-k*(Hour-lag))+c),
data = data1, start = parms)
out<-summary(m)
print(summary(m))
data1$predicted<-predict(m)
plot(data1$Hour, data1$N_Disapp, main=x)
print(lines(data1$Hour, data1$predicted, col="blue"))
output1<-data.frame(b=out$parameters[1,1], k=out$parameters[2,1], c=out$parameters[3,1], name=x)
finaloutput<<-rbind(output1, finaloutput)
}
To run a loop for all the products:
AllIDs<-unique(DegradADJ$Subset_Term)
lapply(AllIDs,degradfun)
Note: finaloutput will contain a table with all the results
To just run one:
degradfun("Product1")
If this helps you I just ask that you "recommend" this post. Thank you.
Relevant answer
Answer
I think, parms a=19 c=9 k=.08 lag=2;
  • asked a question related to SAS
Question
10 answers
I am currently doing a web scraping study about the online prices of laptops. My objectives are
  1. to test if there is a significant difference in online prices of different laptop brands on different days of the month;
  2. to determine if there is a significant difference in online prices of different laptop ranges on different days of the month; and
  3. to test if there is a significant difference in online prices of laptop ranges per brand on different days of the month
I have already finished scraping the online prices of laptops last week. I am planning to use a two-way and three-way ANOVA to answer the objectives but as I was checking the assumptions of ANOVA, I have noticed that the homogeneity of variance is violated. I have used Levene's Test in checking the homogeneity of variance. Is it still okay to proceed in using two-way and three-way ANOVA?
Relevant answer
Answer
As Bruce said: the ANOVA is quite robust given the sample sizes are similar.
I think the more relevant question here is if the price difference is really a useful measure, or if actually the price ratio would be the more sensible statistic to analyze. Usually, price changes are proportional, they are also even usually given in percent. Hence, on the absolute scale, variation of prices of expensive laptops are expected to be larger than that of cheaper models. This all becomes relevant when you include laptops with rather different price tags, and it might be negligible when the laptops all cost about the same (but even then I would consider it smarter to analyze relative changes, for purely theoretical reasons and my understanding of the pricing politics and human behaviour [50€ more on a high-end laptop that costs 4000€ is usually considered irrelevant, wheras the same 50€ more for a laptop that is sold for just about 300€ seems inacceptable).
  • asked a question related to SAS
Question
2 answers
I am looking to calculate Cohen's d for a Welch test so that I can calculate an effect size for unequal variances. The only equation I could find is here (https://www.datanovia.com/en/lessons/t-test-effect-size-using-cohens-d-measure/#cohens-d-for-welch-test). However, I am struggling to calculate it with the output given in SAS or SPSS.
Does anyone have any code or suggestions?
Relevant answer
Answer
Perhaps you may try this MS Excel calculator:
  • asked a question related to SAS
Question
3 answers
I have 2 models (negbin log and poi log) created using proc genmod in SAS. Both have overdispersion. Do I correct for overdispersion and then compare models again or do I compare right away choosing model with smallest deviance ignoring the overdispersion?
What is best remedy to be used with overdispersion? What does the remedy do to correct the situation? In re to former question, different remedies may affect things?
Relevant answer
Answer
What you do depends on several things and is usually specific to your model. Redo the attached search for full details.. Best wishes David Booth
  • asked a question related to SAS
Question
4 answers
My main independent variable is a dichotomous, moderator is the Race variable (Hispanics, Non-Hispanic Black, Non-Hispanic Asian and Non-Hispanic White (ref)) and outcome is also a dichotomous. I have created the race categories into dummy variable except the reference group. I am doing an adjusted logistic model and added the interaction term using SAS. Should I include all the interaction terms (independent*Hispanics independent*Non-Hispanic Black independent*Non-Hispanic Aaian) in one model or in 3 different models? My result is significant for Hispanics and Non-Hispanic Black. How should I interpret this?
Relevant answer
Answer
Your race variable is multi-categorical. To include it in a single model as suggested by David L Morgan, it should be represented with k - 1 variables through dummy coding, where k is the number of categories or levels. For guidance on the procedure and interpretation, you could refer to chapter 10 of Hayes’ (2018) book, referenced below.
Hayes, A. F. (2018). Introduction to mediation, moderation, and conditional process analysis: A regression-based approach (2nd ed.). The Guilford Press. https://www.guilford.com/books/Introduction-to-Mediation-Moderation-and-Conditional-Process-Analysis/Andrew-Hayes/9781462534654
Good luck,
  • asked a question related to SAS
Question
20 answers
My project is conducted as Augmented Design at filed. For doing ANOVA I am looking for SAS software code. I could not find a complete SAS code for ANOVA and means comparison. Can someone help me out?
Relevant answer
Answer
You can use R software.
  • asked a question related to SAS
Question
3 answers
I have a dataset that i have transferred from SAS to Rstudio via the haven package. But when I inspect my dataset in R, i can see that some of the formatted variables are indeed still formatted, while some of the variables are shown as the 'raw' variables without the format.
For instance, I have a numeric variable, M3_SCORE and then right next to it, the formatted version, M3_LEVELS (in SAS, this would be formatted to now be a categorical variable).
In the dataset in Rstudio, however, I can only see the raw numbers and not the new categories.
When I use str(dataset) to inspect the variables, it says that both M3_SCORE and M3_LEVELS are numeric, but under M3_LEVELS it says
..-attr(*, "format.sas")=chr "FMTM3SCORE"
Does this mean that Rstudio will still process M3_LEVELS as a categorical variable, even though I can't see it?
Thank you in advance!
Relevant answer
Answer
You may use this Rcode and see whether new categories matche with your SAS dataset.
cut(nv, breaks, labels = NULL,
include.lowest = FALSE, right = TRUE,
dig.lab = 3, ordered_result = FALSE, …)
cut in R: How to Use cut() Function in R" https://r-lang.com/cut-function-in-r-with-example/
  • asked a question related to SAS
Question
4 answers
Hi!, Everyone! I am a new learner of SAS software. I am reading an article of a study about minority. In the findings of this study, there is a sentence mentioning something as follows:
" A power analysis using MacCallum et al.’s (1996) SAS program indicated that the statistical power of the models were at 0.90."
Here I also attached his conceptual model (Structure Equation medel) of his study. I am wondering how could the author achieved such result (0.90) with SAS software. As you can see in another attached photo, there are lots of items under the main item of power and sample size, such as Anova, t-tests, multiple regression, etc. However, I can't find the item or button, especially for structure equation model or path analysis. May I know if anyone know which item I should choose in order to achieve the statistical power of the model 0.90. Alternatively, if there is no "ready made" menu or direct button when conducting a power analysis for SEM or Path Analysis in SAS. is there any software that I can achieve such result directly or easily ?
Relevant answer
Answer
Hi Oscar, SAS is a very complex too. For complicate questions I'd recommend you sending an email to their support, which is GREAT. They are very responsive and will go great lengths to solve your issue.
However, that's only if you have a SAS license, they don't answer to free users.
  • asked a question related to SAS
Question
9 answers
I have taken the data from a field trial established to screen the sugarcane varieties for sugarcane grassy shoot diseases(GSD). RCBD with three replicates was used to establish the trial. Standard varieties are not available for GSD. Therefore, comparison and rating will not be possible.
The number of GSD infected clumps (phenotypically) and # of total clumps had been taken as the main data of the trial in the one-month intervals from 1 to 12 months (12 disease counts). Disease incidence was calculated. In addition, yield data were taken.
1. Could you please explain what kind of statistical analysis is suitable for analyzing the data taken here in order to find the varietal response for the GSD by the SAS program based on disease data?
2. What data (# disease clumps or disease incidence) is appropriate to use for analysis? Further, it would be a great support if anyone can give an idea of how to write CLASS and MODEL statements of SAS for analyzing this data.
Thank you
Relevant answer
Answer
You can analyze either number of infected clumps or disease incidence (that I understand as number of infected clumps / number of total clumps). The first is count data that follow Poisson or Negative Binomial distribution whereas the second is a proportion that follow a binomial distribution. Therefore, classical methods like Analysis of Variance (ANOVA), a specific case of general linear model, are not appropriate even with prior data transformation like root square or arcsinus (O'Hara and Kotz, 2010; Wharton and Hui, 2011).
Ignoring the repeated measurement, considering data for each month separately, it is highly advisable to use Generalized Linear Model (GLM) with appropriate distributions and link functions that lead to Poisson regression for number of infected clumps and logistic regression for disease incidence. For Poisson regression, overdispersion should be checked and if it is present, use Negative Binomial regression instead of Poisson regression.
To take into consideration repetition in time, the likely correlation between time points (months) should be considered by using Generalized Estimating Equations (GEE) or Generalized Linear Mixed Models (GLMM) (Gbur et al, 2012; Stroup, 2013; Yirga et al, 2020).
In SAS, GLM is done using PROC GENMOD while GLMM is done using PROC GLIMMIX.
- Gbur EE, Stroup WW et al. (2012). Analysis of Generalized Linear Mixed Models
in the Agricultural and Natural Resources Sciences. ASA, SSSA, CSSA. See chapter 5.
- O’Hara RB and Kotze DJ. (2010). Do not log-transform count data. Methods in Ecology and Evolution, 1: 118-122.
- Stroup WW. (2013). Generalized Linear Mixed Models: Concepts, Methods, and Applications. CRC Press. See Chapter 14.
Warton DI and Hui FKC. (2011). The arcsine is asinine: the analysis of proportions in ecology. Ecology, 92: 3-10.
- Yirga AA, Melesse SF, Henry G. Mwambi HG, and Ayele DG. (2020). Negative binomial mixed models for analyzing longitudinal CD4 count data. Scientific Reports, 10: 16742.
  • asked a question related to SAS
Question
12 answers
Hi
I need to use regression models for my research. I used SPSS for linear regression but I want to use univariate and multivariate power regression such as:
Y=a(Xb)
Y=a(Xb)(Zc)
Y=a(XZ)b
and...
where:
a,b,c: model parameters
Y: dependent variable
X,Z: independent variables
Is there any user friendly statistical software to do it?
(I know about SAS or R software, but I think they perform regression by programming)
Thanks
Relevant answer
Answer
R Programming
  • asked a question related to SAS
Question
4 answers
Can anyone help me with the Trial Data Management process?
Relevant answer
Answer
All SAS-related poster/presentation may be found at https://www.lexjansen.com/ Use their search engine for anything related to SAS.
  • asked a question related to SAS
Question
2 answers
I have two independent variables : First is Parity with 2 levels: Gilt and Sow. Second is Diet with 4 levels: A (control), B, C and D. The experiment was run in 4 replicates. it is unbalanced design and have 54 observations in total. I am interested in comparing treatments (B, C, and D) to control for gilt and sow. i.e
Gilt B vs Gilt A, Gilt C vs Gilt A, Gilt D vs Gilt A and
Sow B vs Sow A, Sow C vs Sow A, Sow B vs Sow A
As I wanted to compare the treatments only with control, I chose Dunnett's test with a code looking like-
proc mixed data =A;
class Parity Treatment ;
model Output = Parity|Treatment;
random Replicate;
lsmeans Parity * Treatment / adjust = dunnett pdiff;
run; 
However, this compares all the treatments with Gilt A. It results in following comparisons-
Gilt B vs Gilt A,
Gilt C vs Gilt A
Gilt D vs Gilt A
Sow A vs Gilt A
Sow B vs Gilt A
Sow C vs Gilt A
Sow D vs Gilt A
Which is not what I want. As I mentioned above, I want to compare Gilt vs Gilt and Sow vs Sow. Is there any way to do it? Any help would be much appreciated. Thanks.
Relevant answer
Answer
Use the bylevel option
  • asked a question related to SAS
Question
7 answers
I want to analyze a factorial split-plot data performed in two years (combined analysis) using SAS. I think year should takes random effect in the analysis. Does anyone have SAS codes for this analysis?
Relevant answer
Answer
check this from google
SAS Code for Some Advanced Experimental Designs
  • asked a question related to SAS
Question
6 answers
Thinking about online and MOOC-type certificates for R programming and data analysis, are there any that are recognized and respected by potential graduate schools and employers?
I guess if people can recommend those for SAS or Python, that would be useful as well.
Relevant answer
Answer
Salvatore S. Mangiafico Did you find any reputed certificates for R or python
  • asked a question related to SAS
Question
3 answers
As for example SoV is rep, Genotypes ( parents, crosses, parents vs crosses) and error. I don't know SAS code for this type of ANOVA. Anybody can help me?
  • asked a question related to SAS
Question
3 answers
It has been a time, I'm studying papers that used Interrupted Time Series (ITS) for their analysis, but unfortunately these papers did not mention which software they used! Even if they mentioned software like R, Python, Matlab, they did not mention for example which R package they used, what is the procedure. It is weird because on ML and Metaheuristic studies mostly we mention the whole algorithm and methodology we applied, so other researchers can replicate our work easily. However, about ITS is not like that and it is hard to enter the field!
Appreciate the help of ITS experts.
  • asked a question related to SAS
Question
3 answers
How to analyze lambs survival data (if fixed effects like sex, age, BW, BT.... and so forth, so how to analyzed it in SAS software?
Relevant answer
Answer
The attached google search may be of interest if you wish to try R. Best wishes, David Booth
  • asked a question related to SAS
Question
4 answers
Hii, please give me a complete guide or any material to analyse the Experimental data of RBD, CRD etc. to a find Genetic diversity, Character association, Path analysis & other Plant Breeding related experiments by using IBM SPSS
Relevant answer
Answer
Dear @Rajasekhar Chowdary Duddukur As suggested by @Suyash Bhimgonda Patil, I also suggest you to access online portal of OP Stat for analysis of genetic diversity, character association, path coefficient analysis and other plant breeding experimental data. It is useful, and I have used it several times.
Best wishes, AKC
  • asked a question related to SAS
Question
5 answers
I understand heritability (h2 ) in the 'narrow sense' as the "proportion of the genetic variance (VG) out of the total variance (VG + VE). How do I calculate variability and heritability using Anova output from SAS or Statistica?
Relevant answer
Answer
More to what David Eugene Booth said, you need to consider model complexity and whether the factors are random or fixed. Please get the references or any standard book on regression modelling like Searle and you will be good to go. Best wishes
  • asked a question related to SAS
Question
12 answers
I've conducted an RCT in which I'm testing the effect of a group mindfulness intervention on depressive symptoms. Only one group was running at a time so there were four study waves, with each wave of participants being randomized to intervention or control. Outcomes were measured bi-weekly for 6 months. I'm testing the effect of intervention using PROC MIXED in SAS with bi-weekly assessments nested within participant identified in the repeated statement.
A reviewer has suggested that I include treatment wave as a random factor in the model. However, the interaction between treatment and study wave (as fixed effects) is not even close to significant (p = .99), suggesting that the effect of treatment is the same across waves. Is this sufficient justification to keep my analyses as they are and not include treatment wave as a random factor? Thanks!
Relevant answer
Answer
For me there are two issues here - conceptual (in relation to target of inference) and practical (what can be estimated).
In relation to the Centre's advice (which I did not write!), likelihood procedures can have real problems of estimation (achieving convergence) when the number of groups is small. Full uncertainty modelling via (say) MCMC does not usually suffer from this but you usually end up with wide (asymmetric) credible intervals for the estimated variance as this term cannot go negative (producing a positively skewed posterior distribution). You may then not able to say much about any differences.
Conceptually, if your classification is 'fixed' such that the categories exhaust the possibilities ( there are only two types of school such that private and public are not a sample of all possible types of school) then I would include a dummy in the fixed part of the model to get the difference in the means. Conversely if the categories are representative of wider entities (eg schools) then I would treat as a random classification and as a level in a multilevel model. You are then estimating the variance summarising unexplained between school variation in general.
Returning to the original question, I do not see the four waves as being meaningfully representative of all possible waves, so I would include as a set dummies in the fixed part. I am then trying to infer to those 4 specific waves which might have certain characteristics (eg pre and post Covid) that might affect the results for the key variable of interest. Of course, I could see some making the opposite case!
  • asked a question related to SAS
Question
1 answer
I am now doing survival analysis in cancer. Is there anywhere I can find the SAS macro for reconstructing Individual Time-to-Event Data from a published KM curve?
Thanks a lot.
Relevant answer
Answer
You can blow up the graph and measure it carefully. That's a chemist's approach. Best wishes, David Booth
  • asked a question related to SAS
Question
2 answers
Hi,
We have developed a digitally delivered behavioral change intervention with personalized feedback for college students making use of illicit drugs (see our protocol published here:
(JMIR Res Protoc 2020;9(8):e17829) doi: 10.2196/17829)
We are now in the process of examining the different components of the intervention in an RCT study, using a fractional factorial design.
Does anyone have access to SAS Factex (full version) to run the syntax for us and help us to estimate the number of experimental arms? I do not have access/knowledge on SAS.
The syntax has been defined using the tutorial paper of Collin's et al (Psychol Methods. 2009 September ; 14(3): 202–224. doi:10.1037/a0015826.) and we only want the template SAS generates to define the experimental arms.
All the details can be provided, please email me v.vasiliou@ucc.ie
*Further collaboration will be discussed and of course acknowledgment on the paper will be secured.
Relevant answer
Answer
Hi Medhat, this is what I finally did. I asked some colleagues from the Mathematics department who helped me with this. Thank you
  • asked a question related to SAS
Question
10 answers
While we are analyzing maize data over the locations using SAS software ,is there a means to incorporate all the lines,testers,parents (lines+testers),crosses and checks in one statistical analysis system(SAS 9.0) in order to construct ANOVA skeleton like below,
SV
Sites
Rep(Site)
Block(Rep)
Genotypes
Genotypes*Site
Lines
Lines*Site
Testers
Testers*Site
Line*Testers
Lines*Tester*Site
Parents
Parents*Site
Crosses
Crosses*Site
Checks
Checks*Site
Cross Vs check
Cross Vs Check*Site
Cross Vs Parents
Crosse Vs Parents*Site
Error
Relevant answer
Answer
Dear Bulo
In the GLM procedure of SAS/STAT you may use the following for you requirement.
CLASS Site Rep Block Genotypes Line Tester Parents Cross Check;
...
MODEL SV= Site Rep(Site) Block(Rep) Genotypes Genotypes*Site
Line Line*Site Tester Tester*Site Line*Tester Line*Tester*Site
Parents Parents*Site Cross Cross*Site Check Check*Site;
The rest of your list (Cross Vs check, Cross Vs Check*Site, Cross Vs Parents,
Crosse Vs Parents*Site) I think that may require some dummy variables that will have to be build with more information.
I hope this help.
  • asked a question related to SAS
Question
7 answers
I have an experiment with two levels of two different enzyme and a control treatment (without enzyme) in a completely randomized design. Therefore, a 2 x 2 + 1 factorial design. Can I modeling like a nested design or exist a different model for it?
Relevant answer
Answer
Dear all researchers
In the following manuscript, there was a factorial design including thirteen treatment groups: no added α-tocopherol in the feed (0 dose) or four different doses (50, 75, 100 and 150 mg/kg of diet) of three sources of α-tocopherol (RRR-α-tocopherol, RRR-α-tocopheryl acetate or all-rac-α-tocopheryl acetate). As you can see, there is just a control group (0 dose), and the most important highlight in paper is to find the effect of source, dose, time and interactions.
What we did to resolve the problem was to randomize control group between three sources. Therefore, for the analysis, we could have a control per each source. There are two important points that you need to be aware of: 1) you need to have enough replicates to distribute between treatments (in our case, we had 12 replicates, and after randomization of control, we still had four replicates per each treatment, and 2) after randomization, you have incomplete design for the analysis (due to different level of replicates in control compare to others). After passing the peer review in nature scientific reports, I think it can be an alternative approach in this kind of study design. For more details, please have a look on the following link.
Best regards
Saman
  • asked a question related to SAS
Question
4 answers
I am working mainly with SAS and processed my data all steps in SAS. A user needed the data files in SPSS, but at the same time need all variable attributes to be included (formats, missing, var labels, etc.). I prepared an SPSS syntax for that and it is working if I run it in an additional step. In other words, after done with processing the data in SAS, I run the SPSS syntax using SPSS. What I need is how to include (%include ... doesn't work) the SPSS syntax to run automatically when I run my SAS programs!
Thanks dear friends, YA
Relevant answer
Answer
Thanks again Peter, I will read the text, even though from the first glance I can say, there is no specific SAS --> Python --> SPSS include! But maybe this can help somehow. Thanks again!
  • asked a question related to SAS
Question
3 answers
Hello, I am trying to learn how to use the PCCF for my dissertation research. However, all I can find are directions on how to use the PCCF with SAS. I'm wondering if it is possible to use the PCCF with STATA, and if anyone has an instruction manual, video, or presentation outlining how to do this?
Relevant answer
Answer
Interesting. Good luck.
  • asked a question related to SAS
Question
10 answers
I have  got the  negative heritability (-3%) for Harvest Index in pooled analysis for RILs. But interestingly the heritability for harvest index was  high in individual year (75% and 91%). My design was alpha lattice and 300 RILs were evaluated in two stress seasons for heat tolerance in Chickpea. Analysis was done in SAS proc Mixed model.
Could you please tell me why I got these results and if it is okay then how to interpret the results?
Relevant answer
Answer
Dear Paul, I recommend you to read a very good paper on negative heritability. Despite all the resistance of the scientific community to admit it, I strongly agree with those who think that negative heritability may occur in situations were individuals grouped under similar criteria like genotype are likely to have more divergent traits. Here is the reference:
On Negative Heritability and Negative Estimates of Heritability
David Steinsaltz, Andy Dahl, Kenneth W. Wachter
Genetics June 2020 215: 343-357; https://doi.org/10.1534/genetics.120.303161
Thanks
  • asked a question related to SAS
Question
8 answers
I am developing a questionnaire and first performing an exploratory factor analysis. After I have the final factor structure, I plan on regressing the factor scores on some demographic covariates. Since I am anticipating missing item responses, I am thinking of imputing the item scores before combining them into factor scores (by average or sum).
I came across a paper that suggested using mice in stata and specifying the factor scores as passive variables. I am wondering if this is the best approach since I read somewhere that says passive variables may be problematic. Or, are there any alternative solutions? Thank you!
Here is a link to the paper, and the stata codes are included in the Appendix.
Relevant answer
Answer
Yes... I would like to go with Alvis
  • asked a question related to SAS
Question
8 answers
Compare an open access program like R against paid programs such as SAS & SPSS
Relevant answer
Answer
In addition to usefulness and ease of use and cost of of the software programs such as R, not only R is open source, and ease of use and, we have to take into account, the ability to save large data sets. Using SPSS and SAS not only we have to consider ease of use, but also both SPSS and SAS can solve problems with large datasets that can be saved.
  • asked a question related to SAS
Question
2 answers
I need to calculate the p-trend of age-adjusted incidences. The age-adjusted incidences were calculated using the direct method, so the numerators and denominators were large. I tried the poison model and found the p-trend was <0.0001, but the incidence rates seem to be non-linear, rather than an increased or decreased trend.  Also, I found the value/df are very high (>3500), which should be close to 1 for better accuracy. Is it right to use poison model? Which model is good for calculating the  p-trend of age-adjusted incidences?
data a;
input periods cases pyears;
loga=log(pyears);
datalines;
1 10000 50000000
2 25000 50000000
3 20000 50000000
4 15000 50000000
;
run;
proc genmod data=a;
model cases=periods / dist=poisson link=log offset=loga;
run;
Relevant answer
Answer
Li Jiaqi attached for your kind perusal.
  • asked a question related to SAS
Question
3 answers
Hi Every one,
I am wanting to predict CVD risk in young adults (27-33 y) to associated with early adulthood dietary patterns. Is there anyone who can send me a SAS code to predict CVD risk using a Framingham equation?
Thanks in advance!
Relevant answer
Answer
The following DATA step creates the Heart data table in your CAS session. This DATA step assume that your CAS engine libref is named mycas, but you can substitute any appropriately defined CAS engine libref.
data mycas.Heart;
set sashelp.Heart;
run;
The following code loads the super action in the varReduce action set to perform supervised variable selection:
proc cas;
action varReduce.super /
table={name='Heart'},
analysis='DSC',
tech='COV',
maxsteps=15,
BIC=true,
class={'Status','Sex','Chol_Status', 'BP_Status',
'Weight_Status','Smoking_Status'},
model={depvars={'Status'},
effects={'Sex', 'AgeAtStart', 'Height', 'Weight', 'Diastolic',
'Systolic', 'MRW', 'Smoking', 'Cholesterol', 'Chol_Status', 'BP_Status',
'Weight_Status', 'Smoking_Status'}};
run;
quit;
The table parameter names the input data table to be analyzed. The analysis parameter requests a discriminant analysis of the Heart data set for feature selection. The tech parameter requests that selections be made based on the covariance matrix. The BIC parameter specifies the stop criterion, and the maxsteps parameter specifies 15 as the maximum number of iterations. The selection process terminates when the BIC statistic increases in the last three consecutive steps.
Good luck with your work!
  • asked a question related to SAS
Question
2 answers
Do you have excellent knowledge of both SAS and Matlab programming, and would you be interested in collaborating on a manuscript that deals with Methodologies for Ensemble Forecasting, with application to fisheries population dynamics? You are preferably a MSc/PhD student with strong quantitative background.
Relevant answer
Answer
This is interesting topic, mostly concerned with classification problem for Fishes species recognition. Can be performed via MATLAB or Python. I used MATLAB by considering the data at hand as manifolds valued data via parametric modeling framework.
  • asked a question related to SAS
Question
6 answers
Dear All,
I used my taper data to fit a variable-form taper model Kozak 2004-2 ,which is a nonlinear model. The data is longitudinal data that is irregularly spaced and unbalanced.so we need to overcome the inherent autocorrelation by using continuous-time autoregressive error structure CAR().I read some papers in which the authors use SAS /ETS to fit the models.Take A.Rojo2005 ,for example.In A.Rojo(2005),the author incorporated CAR(2) error process into the models to minimize the effect of autocorrelation inherent in the logitudinal data.I did like what Rojo said in the paper.When I add CAR(1) to the model, I can get the result of autoregressive parameter ρ1 .But when I add CAR(2),It is difficult to converge for ρ2.
Could someone can help me to incorporate CAR(2) into Kozak2004-2?
I add the paper A.Rojo(2005) .Thank you very much.
Here are my SAS codes
proc import out=work.taper
datafile='E:/zzs7.csv' dbms=csv replace; getnames=yes;
RUN; /*read data */
data fit_taper;set taper;
if p="f" then output fit_taper;
run;/*Select data for fitting*/
PROC model data=fit_taper method=marquardt sur dw collin;
exogenous bolt tht dbh;
endogenous dob ;
parms b0 0.9884 b1 0.9478 b2 0.0735 b3 0.4884 b4 -0.9783 b5 0.5511 b6 0.1 b7 0.0389 b8 -0.1579 p1 0.8 ;/*start ualue*/
dob=b0*(dbh**b1)*(tht**b2)*((1-(bolt/tht)**(1/3))/(1-(1.3/tht)
**(1/3)))**(b3*(bolt/tht)**4+b4*(1/exp(dbh/tht))
+b5*((1-(bolt/tht)**(1/3))/(1-(1.3/tht)**(1/3)))**0.1
+b6*(1/dbh)+b7*tht**(1-(bolt/tht)**(1/3))
+b8*((1-(bolt/tht)**(1/3))/(1-(1.3/tht)**(1/3)))); /*Kozak2004-2*/
fit dob ;
run;
Relevant answer
Answer
The use of temporal autocorrelation models is not a satisfactory solution to taper data. This is because the errors have a certain structure: for example the residual for height 1 meters is negatively correlated with residual at 2 meters, and the residual for height 1.3 meters is always zero and in general, residuals below breast height are negatively correlated with residuals above breast height. We have some discussion and references about this in chapter of 12 Mehtätalo & Lappi (2020).
  • asked a question related to SAS
Question
4 answers
Dear all,
Can you help me a question? SAS can estimate 95% CI for HRs by using bootstrapping, but I don't know how to write codes for estimating 95% CI for HRs at a certain point time by using bootstrapping for time-dependent variables.
Thank you so much
  • asked a question related to SAS
Question
5 answers
I’m performing a multivariate regression and my residuals are not normal. I decided to do a log y transformation however this didn’t help should it have or is there another thing I could try?
Relevant answer
Answer
Hello Lauren,
You could try using bootstrap/resampling to obtain coefficient and error estimates. A number of statistical software packages offer this as an option. Here are some links to get you started:
Good luck with your work!
  • asked a question related to SAS
Question
5 answers
I would like to compare survival among patients stratified by insurance status, where insurance status has 3 potential values (private insurance, Medicaid, uninsured). I would like to treat private insurance as the reference group and compare survival among Medicaid patients and uninsured patients to patients with private insurance; I am not interested in comparing survival between Medicaid and uninsured patients.
If I were to make this comparison using Kaplan-Meier curves, the generally accepted way appears to be to first perform a log-rank test to see if there is a significant association between insurance and survival. If that log-rank test is significant at p < 0.05, then I could perform post hoc tests where I treat private insurance as the reference group and compare Medicaid survival to private insurance and uninsured survival to private insurance using a p-value adjustment for multiple comparisons. In SAS, a reasonable adjustment method in PROC LIFETEST appears to be ADJUST = DUNNETT, which allows you to treat one group as reference rather than perform all pairwise comparisons.
If I were to make this comparison using a Cox proportional hazards regression model, the generally accepted way appears to be to treat private insurance as the reference group in the model and compute hazard ratios comparing Medicaid mortality to private insurance and uninsured mortality to private insurance. For those 2 comparisons, significance is then evaluated using 95% confidence intervals.
My first question is why are p-value/confidence level adjustments encouraged for Kaplan-Meier curves but not hazard ratios from the Cox model in this scenario (assuming my understanding of generally accepted practices is correct)? Shouldn’t the confidence intervals for the hazard ratios be made wider to account for multiple comparisons? This never appears to be done in the literature, though.
My second question is since the comparisons to the reference group are of primary interest rather than the overall significance of the independent variable, when using Kaplan-Meier curves, is it ever acceptable to treat the comparisons to reference as planned comparisons and not perform the overall log-rank test? In a Cox model, the Type III p-value appears to function as a test for the overall association between the independent variable and mortality, but I don’t think I’ve ever seen it reported in the literature, but log-rank values for the overall association between the independent variable and survival are regularly reported.
Relevant answer
Answer
Your answer help me a lot.
  • asked a question related to SAS
Question
13 answers
Esteemed colleagues,
I crave your suggestions on the best analytical software for analyzing economic impact using input-output and multiplier analysis?
Which of these is most appropriate: Stata, EViews R, SPSS or SAS...or any other?
I welcome constructive suggestions.
Kind regards and stay safe 🙏
Relevant answer
Answer
I suggest Matlab (suitable for matrix algebra) or Python (see http://www.real.illinois.edu/pyio/ and https://pymrio.readthedocs.io/en/latest/)
  • asked a question related to SAS
Question
4 answers
Dear colleagues,
I am looking for a practical guide presenting the non-parametric tests intended for students without mathematical background (or very little) with if possible the codes SAS or R.
Thank you.
Relevant answer
Answer
Hi Natacha,
rcompanion.org is a great source with many examples of non-parametric tests.
sthda.com is also good, but the author uses his own limited packages.
  • asked a question related to SAS
Question
7 answers
I built a regression model which has a total of 6 risk factors (regressors) and 7 two-way interaction terms. I need to perform a response surface analysis of my specified model which has a total of 6+7 = 13 terms.
However, When I am trying to perform RSM in SAS using PROC RSREG, it is considering all the linear factors, all the second-order factors, and all the two-way interaction factors. So, it is considering a total of 6(linear)+6(quadratic)+30(interaction) = 42 factors. This is the standard way I have seen most of the books/ research articles performing RSM. But don't want to include all the 42 terms. Instead, I just want to include only 13 terms which I have identified in my regression model. Is there any software that does that? Thanks, in advance
Relevant answer
Answer
Aditya Chakraborty, you can consider this R package for RSA at https://www.nicebread.de/software/RSA/index.html
  • asked a question related to SAS
Question
4 answers
I wonder about the execution time of an exact Fisher test under SAS (proc freq, option exact fisher without Monte Carlo estimation). Other software performs the test in an acceptable time, which is not the case with SAS (sometimes several hours).
The other calculations in SAS only take a few seconds at most. Do you have the same observation? That puzzles me.
Relevant answer
Answer
Hello Natacha,
You didn't indicate the cell sizes for your data set, but:
In general, the larger the N, the slower the exact computation of p-values will be, whether by enumeration or "accelerated" methods. I presume you're not running the Cytel add-on of exact tests in SAS, which the company claims run more quickly (but, it costs more).
I agree with Jos Feys that the native SAS proc could certainly be better optimized.
Good luck with your work.
  • asked a question related to SAS
Question
8 answers
I have already analyzed this data in MS Excel 2013 but i'am trying to analyze this data with a statistical program such as SAS. if any one of you have a good experience in statistical data analysis with SAS or in R then suggest me a R or SAS procedure to analyze this data. Read the attached Excel file
Relevant answer
Answer
Very interesting question, I am waiting for the answer, too...
  • asked a question related to SAS
Question
6 answers
I'm trying to fit RRM model manually using any of the three software.
Relevant answer
Answer
Hi,
I think you need to check Apollo user manual that you can find its link below:
  • asked a question related to SAS
Question
1 answer
I am conducting a meta-analysis on 42 studies. The outcome of interest in each study is represented by a percentage and 7 of them are 0% and 100%. There are 2 categorical covariates. My question is how can I do a meta-regression of using percentage (outcome) in SAS using proc mixed? Thank you.
Relevant answer
Answer
Do you havr the Standard deviation mean and sample size of each of your 42 papers.This meam could be the mean of percentages of two groups namely the control and experimental groups
  • asked a question related to SAS
Question
5 answers
since SAS university edition is out and freely available for non-commercial use (or at least what i understand), i want to buy a book for learning SAS for general statistical needs which i can also use for a desktop reference manual.  I have basic knowledge of SPSS (thanks to discovering statistics using spss by Andy Field) and Stata (A gentle introduction to Stata by Alan A Acook).  SAS version of Andy Field's book has some negative reviews on amazon which hesitates me.  Any advice and experience is appreciated...
Relevant answer
Answer
I recommend reading Learning SAS by Example: A Programmer's Guide, Second Edition 2nd Edition by Ron Cody
  • asked a question related to SAS
Question
3 answers
Test to compare 2 groups on a series of items.
I have a questionnaire with 100 items. For each of those 100 items, I have the proportion for each item of those who answered good or very good), by sex. So I have a column with the items, a column with proportion of women and a column with proportion of men. I want to know if the 2 groups are different in their way to answer good or very good for this questionnaire.
I was thinking to calculate the difference in the proportion and do a Wilcoxon signed rank sum test, using SAS proc univariate. I have never done it with this type of data.
Thank you
Relevant answer
Answer
  • asked a question related to SAS
Question
6 answers
Sample size too small for Logistic Regression.  Was using SPSS but understand exact can be run in SAS.  I have access to SAS studio
Relevant answer
  • asked a question related to SAS
Question
14 answers
I want to know what are the predictor variables for the members who cancelled the account ?I have 7 independent variables and used binary logistic regression since dependent variable is categorical. Could someone give me possible suggestions to improve ROC which is 0.62 . I appreciate your suggestions.
Relevant answer
Answer
I have reviewed this thread and have one more thing to contribute. Paul Yarnold's point three citation two above also discusses the importance of validity analysis which was also mentioned by David Morse vis-a-vis cross validation above.
Even after establishing a model with reasonable predictive accuracy, the reproduciblity of model results should be considered. The citations below demonstrate how models with weak effects are unlikely to hold up in reproduciblity analyses designed to guard against false positive results .
I have developed a bootstrap resampling approach for evaluating the exact discrete 95% CI for model and chance with the code for R provided in the supplements. These are directly descended from Paul Yarnold's novometric theory. I hope to provide a link to a downloadable R package soon.
Warm regards,
NJR
  • asked a question related to SAS
Question
20 answers
An insect individual is placed in a box that has 6 sectors, each holding a different food. The insect is placed in the center of the box, and it is free to go in any sector. After it enter into a sector (first choice), it is re-placed in the center of the box for a second choice, and again for a third choice.
How can I test whether one sector is preferred over another? Also, how can I test whether one sector is preferred as the first choice?
I'm wondering whether to analyze these data using a multinomial model, as 'sector' is a multinomial variable. Alternatively, I'm wondering whether I should use Fisher's exact test.
What do you suggest?
  • asked a question related to SAS
Question
4 answers
Say for eg we have a  bigger( about 1/2 million observations)  data set on birth weights .
Depended variable being a low birth weight a dichotomous variable.
Independent variable-is different age group mothers ( say 4 groups 15-25 26-30 31-44, 45-59).
confounding variables :1) marriage 2) financial status 3) got insurance or no. etc..all of them are dichotomous variables (yes /no
want to know the association by calculating an Odds ratio. by constructing a model and analyzing  via multi logistic regression.  model ... say as  below
LBW(dependent var))= b +x1(mothers age group/independent var )b1+x2(marriage/confounding var 1) b2+.confond var2 B3+.........etc
when I ran a SAS code including all variables with an aim to delete the confounding effect on my dependent var ..what is the best strategy to do..
1)is it stratification or controlling or adjusting .. 
2)what is the difference between those 3/any of those are same.
3)how dos those 3 procedures/methods work and effect the OR of dependent variable
 I'm sorry I'm new to statistics trying to understand basic concepts..
Relevant answer
Answer
Hi there, I am also confused about the concepts of controlling and adjusting in a regression model for a while. Actually, this comes up from time to time, and many people think they are telling the same thing. However, I was convinced by Andrew's explanation that recommended say 'adjust for' instead of 'control for',
  • asked a question related to SAS
Question
8 answers
I have experimented with two Factor: Factor A: Two iron sources and Factor B: two seasons with three blocks. When I run the SAS, the interaction not significant, but the combination of the treatment was significant.
what the problem for this
Relevant answer
Answer
With two factors A and B, there is a main effect of A, a main effect of B, and an interaction effect of A and B.
  • asked a question related to SAS
Question
4 answers
I have noticed that when using the proc phreg in SAS and the coxph in R in the same data, the model should be different in order to get the same results. In proc phreg I model the time with the censor variable (where censor=1 means the patient withdrew from the study) in order to obtain a HR. In R I use the same model but this time censor=1 means the patient experienced the event, in order to obtain the same HR. Is there a difference in the definition of the censor variable or the models are different?
Relevant answer
Answer
Between SAS and R, the difference lies in the definition of the censor, not in the model.
  • asked a question related to SAS
Question
7 answers
I used to use SAS software, But recently I got acquainted with Statgraph 18 software. I think that's better. Especially in terms of drawing diagrams. What's your preference?
Relevant answer
Answer
I routinely use Minitab 18 statistical package for PCA. It is convenient, powerful, makes all graphs, and based on Graphical User Interface dialog box- no any coding is needed.
Principal Components Analysis is accessed using
Stat > Multivariate > Principal Components. Use principal component analysis to help in understanding the underlying data structure and/or form a smaller number of uncorrelated variables (for example, to avoid multicollinearity in regression). An overview of principal component analysis can be found in most books on multivariate analysis.
Dialog box items are the following:
Variables: Choose the columns containing the variables to be included in the analysis. Number of components to compute: Enter the number of principal components to be extracted. If you do not specify the number of components and there are p variables selected, then p principal components will be extracted. If p is large, you may want just the first few. Type of Matrix Correlation: Choose to calculate the principal components using the correlation matrix. Use the correlation matrix if it makes sense to standardize variables (the usual choice when variables are measured by different scales). Covariance: Choose to calculate the principal components using the covariance matrix. Use the covariance matrix if you do not wish to standardize variables. <Graphs> <Storage>
  • asked a question related to SAS
Question
8 answers
How can I do mean separation for treatments arranged in factorial ways by SAS? Or could you tell me other software which can do this? Thank you
Relevant answer
Answer
Dear Zabihollah
I do not understand what you want to do now. Do you have an example?
  • asked a question related to SAS
Question
3 answers
I have water temperature data for moring and evening, I need to show the maximum and minimum value by the SAS program.
Can anyone inform me of the SAS code for this
Relevant answer
  • asked a question related to SAS
Question
6 answers
Use of proper statistics to analyse research data is the most important thing. Please suggest me some "Practical" biostatistics course which is available online. Thank you.
Relevant answer
Answer
  • asked a question related to SAS
Question
2 answers
Hello SAS recommends to me that I look at the article Fisher, R. A. (1938). Statistical Methods for Research Workers. 10th ed. Edinburgh: Oliver & Boyd. in order to understand how to transform nominal variables by optimally scoring the categories.
I tried reading it and it just made me even more confused. Can anyone give me a layman's term on the optimal scale (SAS defines it as optimal score or opscore)?
Relevant answer
Answer
Hello Marco,
Here's a related RG thread that you may find helpful: https://www.researchgate.net/post/Fishers_Scoring_Algorithm
Good luck with your work.
  • asked a question related to SAS
Question
3 answers
I want to generate a smooth curve for my data using the Loess function.
My IVs are different treatment groups. In each treatment group, I have 4 repetitions so there are 4 values for each IV. In this case, is it suitable to use the Loess function in order to see which treatment group gives the optimal values?
Do I need to calculate the mean for each 4 repetitions and then run the Loess function again?
Can anyone help me with this issue?
Thanks so much.
Relevant answer
Answer
SAS code example (also in attachment):
data a;
input Subj Group $ T1 T2 T3 T4;
cards;
1 Epinephr 297 255 255 246
2 Epinephr 298 257 254 247
3 Epinephr 293 251 254 243
4 Epinephr 297 254 256 245
5 Epinephr 290 259 251 240
6 Acetyl 243 237 237 240
7 Acetyl 244 240 237 247
8 Acetyl 245 235 236 239
9 Acetyl 242 238 235 238
10 Acetyl 244 239 240 240
11 Control 213 219 219 207
12 Control 214 220 219 207
13 Control 215 219 220 203
14 Control 213 224 222 205
15 Control 220 219 221 210
;
proc glm data=a;
class Group;
model T1 T2 T3 T4 = Group / ss3 nouni;
repeated Time 4 / summary nom;
run;
data long;
set a;
time = 1; resp = T1; output;
time = 2; resp = T2; output;
time = 3; resp = T3; output;
time = 4; resp = T4; output;
drop T1--T4;
proc sort data=long; by Group;
run;
symbol1 color=black value=dot ;
proc gplot data=long;by Group
/*where Group="Epinephr";*/
title1 ’Scatter Plot by Group’;
plot resp*time;run;
proc loess data=long;by Group;
/*where Group="Epinephr";*/
model resp=time/details(OutputStatistics);
run;
proc loess data=long;
where Group="Epinephr";
model resp=time;
ods output OutputStatistics=Results;
run;
symbol1 color=black value=dot;
symbol2 color=black interpol=join value=none;
/* macro used in subsequent examples */
/*%let opts=vaxis=axis1 hm=3 vm=3 overlay;*/
axis1 label=(angle=90 rotate=0);
proc gplot data=Results;
title1 ’Data with Default LOESS Fit’;
plot DepVar*time Pred*time//* &opts*/;
run;
  • asked a question related to SAS
Question
4 answers
Hey,
I'm working on cancer claims data and we are looking at drugs they are receiving and tracking their outcomes while they are on the drug (cost, no. of admissions etc.). A patient can be on multiple drugs through the time we tracked longitudinally.
We selected 4 drugs that we want to compare the means and say whether or not Drug A is statistically different from all 3 drugs. Since, a patient can be on Drug A and B, ANOVA condition of independence is broken to do post-hoc test for multiple comparisons.
I'm not familiar with this type of issues and new to SAS (can't use R for this work). I would appreciate if some one can help me guide through this process.
Thanks.
Relevant answer
Answer
From what I gather, it sounds like ANOVA wouldn't be appropriate here. Some sort of generalized linear model with each drug entered in as independent variables - proc mixed, proc glm, proc glimmix. This way the cases where a patient has multiple drugs can be accounted for - it would also account for longitudinal aspect of the data, since it seems that patients can have multiple encounters over time so observations aren't independent from that standpoint either. You could control for other confounding variables, include interaction terms, etc.
Could use more information to be sure though, as maybe I'm not interpreting the situation correctly.
  • asked a question related to SAS
Question
3 answers
why the standard error in SAS GLM results is the same in different treatment effect or the second effect and even in interaction groups
also, Id like to ask is this accepted in research papers
Relevant answer
Answer
And there you have it ; the standard error of the the estimate depends on the variation in the X variable, the number of observations and the overall unexplained variation. As you have balanced factors which are all the same in effect you get the same standard error. You would worry if the SEs differed!
  • asked a question related to SAS
Question
3 answers
There are certain models in "Model Templates for PROCESS for SPSS and SAS" (e.g. Models 23 through 27) which are not accessible via PROCESS. Can anyone advise me how to get access to these models? Thank you!
Relevant answer
Answer
Hello Ilona,
You are correct that Andrew Hayes' macro does not have built-in template for Model 25 (for example). As Cristian's recommendation implies, Hayes does discuss how to write syntax that the PROCESS command will act on: See appendices A (part of which is in Cristian's link) and B of his text:
Hayes, A. F. (2018): Introduction to mediation, moderation, and conditional process analysis: A regression-based approach. (2nd ed.). New York, NY: Guilford Press.
Good luck with your work.
  • asked a question related to SAS
Question
2 answers
I want to use Alpha Lattice Design in SAS. It is multi location and multi year trial. 4 locations, 2 years (4x2=8 environments) genotypes are 45.
2 replications
5 blocks/rep.
Thanks in adcance.
Relevant answer
  • asked a question related to SAS
Question
3 answers
In small angle neutron scattering SAS (actually small angle neutron scattering, SANS), I obtained a 1D pattern showing a peak which is located over 1 inverse angstrom. The actual peak position is approximately 1.2 inverse angstrom. What is the possible meaning of it??
The scattered specimen is martensitic steel including inclusions in dozen nanometers and precipitate particles in few nanometers. The peak exists always regardless of heat-treatment.
Can I get a small clue on it??
(Please see the attached figure.)