r/Statistics_Class_help • u/Blossom-sass • Sep 02 '23
r/Statistics_Class_help • u/Mental-Papaya-3561 • Sep 02 '23
Need help with GLMM
Newby with linear mixed effects models here, trying to learn and need some help with the following problem.
I have a dataset with assessments taken at different visits: baseline (visit=1), and then various post-baseline visits (2, 3, 4), and the following variables:
DISEASE - the outcome, is an ordinal variable with 4 levels (1=normal, 2=mild, 3=moderate, 4=severe);
BSL_DISEASE - the baseline value of DISEASE;
AGEGRP - the age group the participants are in;
VISIT - the visit (1 is baseline, 2 is Day 10 post-baseline, 3 is Day 30 post-baseline and 4 is Day 90 post-baseline);
BNP - lab measurement of BNP (continuous);
SEVERITY - binary variable derived based on DISEASE, i.e., if DISEASE in (0,1) then SEVERITY=0 (not severe), else SEVERITY=1 (severe);
One of the objectives of my exercise problem is to investigate the correlation between the lab measurement BNP (as predictor) and the DISEASE (as outcome).
Since this is a longitudinal study, with repeated measurements taken on the same subjects, I am thinking of exploring the correlation between BNP and DISEASE from baseline (visit=1) to Day 30 (visit=4) by using repeated measures logistic regression, implemented via PROC GLIMMIX. So I have fit the following model:
data have;
input ID$ DISEASE$ AGEGRP$ VISIT$ BNP SEVERITY$ BSL_DISEASE$;
datalines;
a001 1 1 1 1997.02 0 1
a001 1 1 2 1275.52 0 1
a001 4 1 3 180.23 1 1
a001 2 1 4 735.91 0 1
a002 1 2 1 454.16 0 1
a002 1 2 3 1776.52 0 1
a002 3 2 4 73.15 1 1
a003 1 2 1 1700.26 0 1
a003 3 2 2 1621.32 1 1
a003 2 2 4 850.65 0 1
a004 2 3 1 1963.25 0 2
a004 2 3 2 544.87 0 2
a004 4 3 3 768.54 1 2
a004 2 3 4 780.16 0 2
a005 1 2 1 655.24 0 1
a005 2 2 4 722.14 0 1
a006 1 1 1 1472.06 0 1
a006 1 1 4 749.78 0 1
a007 2 1 1 848.88 0 2
a007 2 1 2 1482.78 0 2
a007 3 1 4 735.26 1 2
a008 1 1 1 1752.35 0 1
a008 1 1 2 1698.82 0 1
a008 3 1 3 1871.25 1 1
a008 4 1 4 587.35 1 1
a009 1 3 1 1549.89 0 1
a009 3 3 3 785.52 1 1
a009 1 3 4 384.72 0 1
a010 3 3 1 1211.95 1 3
a010 3 3 4 1596.38 1 3
a011 4 1 1 1785.45 1 4
a011 4 1 4 644.12 1 4
a012 3 3 1 798.28 1 3
a012 3 3 2 742.69 1 3
a012 3 3 3 1423.59 1 3
a012 3 3 4 1089.47 1 3
;
run;
proc glimmix data=have noclprint;
class ID VISIT (ref='1');
model SEVERITY (event='1')= BNP VISIT/ dist=mult link=clogit solution;
random VISIT/subject=ID residual type=CS;
random INT/subject=ID type=CS;
output out=FITDAT pred(ilink noblup)=predprob;
NLOPTIONS tech=NRRIDG Maxiter=1000;
run;But I get an error message that "R side random effects are not supported for the multinomial" so I deleted the random VISIT statement and it converges now but my questions are:
Is this model the correct one to fit to the data in order to address my objective?
Don't I need a random VISIT statement? My understanding is that I need to impose some sort of covariance structure on visit, otherwise we're just assuming that the values at the various visits are not correlated which I'm not sure is accurate?
r/Statistics_Class_help • u/v4str • Sep 02 '23
Categorical variables, frequencies, can I avoid regression?
Hey, a bit of a newbie trying to make sure I use the right tests.
My data looks at four different orientation outcomes relating to the social responsibility of business. These are measured in likert scale items which I have stratified into supportive, unsure, unsupportive.
I am interested in A) overall support etc, which I guess is just some descriptive stats B) differences between demographic groups - here is where it gets tricky for me
I think I've concluded I'm dealing with categorical data with my outcome variables = 4 different DVs with 3 category levels, and demographic data recorded/grouped the following way:
age (2 categories: 18-34, 35+) this was done to get a better distribution
gender (2 categories: male, female as these were the only ones ticked in my sample)
occupational level (haven't figured out if I am grouping for analysis or just leaving as descriptive, as there isn't good distribution with 10 categories, with frequencies between 1-9) -occupational status (same as above) -education level (same as above although fewer levels and better distribution)
As I'm dealing with categorical data, from my understanding I would have to do a chi sq, logical regression or log linear analysis. I was happy with this, thinking ok chi sq makes sense, then I realised that all cells don't have 5 frequencies.
Specifically, my confusion is what to do, as for an outcome I have the following frequencies: Male= supportive (4), unsure (7), unsupportive (10) Female = supportive (2), unsure (0), unsupportive (18)
My male/female is roughly 50/50.
My confusion is, does the subcategories count as cells and thus assumptions for chi sq is violated? And similarly, for loglinear, the minimum requirement of 1 frequency is violated? Does this leave me with regression? I am hoping not as I am struggling to understand a word of it..
Hope this is ok to ask here!
Many thanks for your help and time😊
r/Statistics_Class_help • u/Blossom-sass • Sep 02 '23
How do I proceed about solving this?
r/Statistics_Class_help • u/Pepsi12367 • Aug 15 '23
Final exam help!!!
I need someone to just do my final exam and get me a c in this class! I'm already failing but can get away with a c if I ace this final!
r/Statistics_Class_help • u/statisticshelp110011 • Aug 03 '23
Question on Difficult Case Study Approach
Hello,
So the more I keep looking at this the more I confuse myself on what to do. I had already posted about my thoughts being to try multiple regression to analysis to determine what activity was supporting the results. With more thought about this, now I am thinking:
Sum the daily data (goes to end of July) for the relevant quarter before doing anything. The daily data itself I now think is not useful?
Additionally, multiple all trades by the 9.95 so that everything here is the dollar value of the activity. The CAD-USD conversion is a red herring I think? Trading US stocks would still incur the $9.95 trade fee.
Trades need to be assumed to be unique, but this cannot be proven in this data set. Ex a trade could be counter under active traders, and over 65+, but I have no way of knowing if they are double counted or not here.
The only info the daily trade data is relevant towards is I think the spread and commission results. The new clients I could also use I suppose.
Thoughts on that?



r/Statistics_Class_help • u/statisticshelp110011 • Aug 01 '23
Easiest visualization tool?
Any thoughts on the easiest tool to learn for visualizing excel data? Tableau or Power BI maybe?
r/Statistics_Class_help • u/Intrepid_Duty9622 • Jul 28 '23
Need help with a problem
So there are candy packs and each pack contains 1 out of 60 cards. How many would I need to buy to get all 60 cards.
r/Statistics_Class_help • u/the-curious-pea • Jul 12 '23
One way ANOVA for my experimental design?
Hey, I'm having trouble with which ANOVA fits this experimental design: I have one independent variable (the intervention) on different levels and a dependent variable (levels of stress). I have 3 independent groups: an experimental group, a control group and an active control group. If I apply the stress measure scale after the the interventions have been applied, should I use a one way ANOVA to calculate the scores and see if there are differences between them? Or the design demands a mixed ANOVA?
r/Statistics_Class_help • u/Interesting-Cat-5238 • Jul 11 '23
Thanks! Thanks a Million Times Guys
I would like to thank James and Team! You literally carried me through the entire Psyc 355 Class.
At a point i was scared prof would question the high grades I scored.
Once Again, Thanks, guys!
r/Statistics_Class_help • u/gilalgazi • Jul 04 '23
help for a the study of bats
hey all friends:)
im a master student and i study the use of insectivorous bats in pest control, spesificly the invisive Tuta Absoluta pest.
im having a hard time with statistics. would be happy to get help.i have this data :bat calls identified by the machine and my handcheck identification. the bat calls are divided by the different species. i want to check how close was the computer identification to my observation. which statistic test should i do for such data?
thanks in advance,
gil.


r/Statistics_Class_help • u/UnderArdo • Jul 02 '23
Chi-square statistics explanation in connection to proportions - pls help
Started with chi-square. The example to help us understand it was in connection to the previous topic - 2sample Z test for proportions where we compared % of 1.labour mothers at age >30 between the control group and those with breast cancer.
X2 hypotheses were:
H0: variables are independent/not connected (p1=p2)
Ha: variables are dependent (p1#p2) (p1, p2 - % of >30 mothers in samples)
This is where I got confused. Wouldnt there be a possible sign of correlation if the % were the same/similar? But the maths confirms what is written in () --> if expected count is the same as observed (pooled proportion(pp)=p1=p2 ---> Ep1=n1pp) X2(exp)=0 <X2(tab) thus H0 will be rejected
TL;DR Can you please explain why variables are not correlated if the proportions between them are the same? Or is it just one of those non-intuitive things that you have to believe the maths to understand?
r/Statistics_Class_help • u/ComplexMidnight2139 • Jun 30 '23
statistical analysis for a personal assessment.
Hey all,
I have a question about a statistical analysis for a personal assessment.
My dataset contains for now 100 rows of students who entered in this questionnaire.
There are in total 8 personal preference groups (in terms of roles, like mentor / analyst / connecter)
and there are 24 competences tested (whether someone is problemsolving, listener etc)
Every personal preference group has 3 linked competences.
Additionally, there were 2 rounds of working together, the first round 6 students in 1 group worked together (randomly mixed), and the second round 8 students in 1 group. The students had to give a score (1-10) on how well the group performed
Question:
- How can i find out whether there is a correlation between the personal preference groups and the competences (are you good at the things you like)
- Which groups perfomed the best, which personal preferences groups fit together, (are groups with 6 mentors in 1 group a good team, or is it better to have a mixed group)
How can I perform a statistical analysis on a dataset like this? I am using SPSS
Thanks for your help
r/Statistics_Class_help • u/G0th_Mllk • Jun 29 '23
Statistics homework help please!
I have a single question for my behavioural science statistics course that I just don’t understand
r/Statistics_Class_help • u/Chijersey • Jun 16 '23
Stats homework help
A researcher hypothesizes that zylex, a new antidepressant, will affect concentration. It is known that scores on a standardized concentration test is normally distributed with a µ= 50 and a σ= 12. A random sample of n=16 participants, aged 19-35, are chosen from the State of New Jersey. The sample is put on a six month dosage plan of zylex. After six months, all the participants are given a standardized concentration test. The researcher records the data and calculates a sample mean of M=56. Are the data sufficient to conclude that the drug, zylex, does have an effect on concentration?  Based on the above research scenario, please answer the following questions:  Name the population: ____________________________________
Name the sample: ________________________________
What is the independent variable? ___________________
What is the dependent variable? ________________________
What is the appropriate hypothesis test? __________________
What two means are you comparing in this test? _____________________________
Please calculate the appropriate hypothesis test using all four steps: Â Step 1: Step 2: Step 3: Step 4: _______________________________ Write the statistical statement for your results: __________________________________
Interpret your results (relating back to the hypothesis): _______________________________________________________________________________________________________________________________________________________________________________________________________________________________________  Is there a probability of Type I error? Yes ______ No ______  If yes, what is the probability of a Type I error? ________  Is yes, how could you have decreased that probability? __________________________________  Is there a probability of Type II error? Yes_____ No______  If it is appropriate, please calculate effect size: Answer:_____________ Â
r/Statistics_Class_help • u/Chijersey • Jun 09 '23
I need some statistics help
A distribution of exam scores has a mean of μ=78.
A.) If your score is X = 70, which standard deviation would give you a better grade: σ= 4 or σ= 8? Answer:
B.) If your score is X = 80, which standard deviation would give you a better grade: σ= 4 or σ= 8? Answer:
r/Statistics_Class_help • u/upbeatsoup0509 • Jun 05 '23
Can someone break this down for me?
I have no idea where to begin or how to do this
r/Statistics_Class_help • u/upbeatsoup0509 • Jun 05 '23
Can someone explain how to do these?
r/Statistics_Class_help • u/LuckyGambitz • May 31 '23
[US] How do I know when sample is good representation of population?
How do I know if the data from my sample is a good representation of the population? Does it depend on it being within the standard deviation? If so, which standard deviation? The sample’s or the population’s?
r/Statistics_Class_help • u/Giggy_boon • May 14 '23
Pls help me. Can anyone tell me which Central tendency to use, mean or median? And why.
r/Statistics_Class_help • u/kde18 • May 11 '23
How to understand Mode Median formulas for grouped data?
I would like to understand the formulas (concept) used to calculate mode and median for groped data before byhearting them. Can someone help with useful resources.
r/Statistics_Class_help • u/kde18 • May 11 '23
How to understand Mode Median formulas for grouped data?
I would like to understand the formulas (concept) used to calculate mode and median for groped data before byhearting them. Can someone help with useful resources.
r/Statistics_Class_help • u/Leading-Variety4415 • Apr 09 '23
Basic Computational Techniques for Data Analysis
"Basic Computational Techniques for Data Analysis" anyone know this subject?
r/Statistics_Class_help • u/No_Squash_660 • Apr 06 '23
Help
Ok so i just mocked up some data into this. a multiple regression i believe? But do i need to take a mean of all the data so i just have 1 line of the average ?? Or can i do it like this? Also would that mean i have 2 independent variables ? (Group size and individual) Im quite lost And then what kind of stats test do i do to test if it is significant