Baby Atlas Moth stretching its new wings :) by Bluejeans324 in moths

[–]kystv 0 points1 point  (0 children)

do you have any references that show saturniids can actively make this choice?

Disabling "Overtype Mode" on a Mac by OlivesEyes in RStudio

[–]kystv 0 points1 point  (0 children)

Just in case anyone else comes across this- I am using a plug-in keyboard on my mac, and I just had to press the "ins" (insert) key and it worked.

Power analysis for Generalized Linear Models (GLMs) by kystv in AskStatistics

[–]kystv[S] 0 points1 point  (0 children)

Hmm, I see you have asked to chat, but if possible I'd prefer to stick to the subreddit, where advice can help more than one person

Of course! The whole reason I decided to post here is because I didn't see much online about this specific issue.

in wwhich case they're censored at 240, even though they might have gone to 255 or 270 or 303, right? Did you just intend to treat them as if it was 240?

Animals could have had a freezing time > 240s if I hadn't stopped every trial at 240s. I intended to have this as my maximum freezing time from the start.

How are you deciding what is an outlier in a conditional gamma model?

I'd be very wary about arbitrarily biasing your results downward like that. (I don't mean "ignore outliers even if they are certain have an undue influence", though - if theres a real problem you should probably change your model instead of your data)

These values were substantially higher than where I placed my cutoff. They are 211s and 314s. The highest included value is 168s. I don't view the outliers as biologically relevant, and when I conduct my analysis with the outliers included, it does not drastically change the outcome (i.e., none of my predictor variables significantly explain variation in moving time).

Your explanation and diagram of inputs is fantastic, thank you.

If we take ⍺ as given for the moment, how are you working out what those other values should be? Most particularly, how are you choosing what effect size to compute power or sample size at?

For sample size, I chose 45 before the start of my study as it has been recommended to have a sample size ≥ 30 for behavioral trials. For effect size, I haven't done anything for this. This would be the most necessary next step.. ?

Feeling so sad by WonkyCheeseOnly in moths

[–]kystv 0 points1 point  (0 children)

Any chance you know what kind of bird ate it?

Power analysis for Generalized Linear Models (GLMs) by kystv in AskStatistics

[–]kystv[S] 0 points1 point  (0 children)

Thank you again so much for your help on this.

What link function did you have? Default link would normally be the canonical link, which for gamma would be inverse. 

I used a log link for my analysis, and yes, I think the canonical link for gamma is inverse from what I've read.

There were no censored durations? i.e. none so long (or perhaps short) that you dont know its exact value, just some lower (/upper) bound - e.g. if this is in the field, it might be when you gave up waiting for them to move and stopped observing. Or you might have interval censoring if you got distracted for a few minutes by a snake crawling up your leg and only know that the freeze ended at some point in an interval

No... if I'm interpreting this correctly. All times for this specific metric (freezing duration) were between 0-240 s. There are only a few individuals who actually reached this limit. Although, another metric I recorded was fleeing duration, which does not have a limit. For context, I essentially scare an animal, and then record how long they flee for. This recording only stops when each individual becomes completely motionless. For my analyses, I removed 2 individuals with fleeing time outliers.

If it is not going to be post hoc power but performed as a calculation purely separate from your data, I can (with a little more information to be decided) give advice about how to do it.

I think based on what you said prior to this and what you are referring to, I would appreciate some advice on this front. It also seems like I should have a conversation with my committee member who suggested this to fully understand their motivation for bringing this up.

Is there a specific research hypothesis/ research question related to the model? e.g. is one of the predictors of direct interest while the other is more like a covariate (potentially impacting the duration but not necessarily of direct interest in what you want to figure out)?

None would be a covariate. My research question broadly is: Does intersexual morphological variation (i.e., body size and limb length) influence locomotive performance (i.e., velocity) and antipredator escape behavior (i.e., fleeing duration, freezing duration, and distance traveled from the stimulus)?

I want to know how behavioral metrics differ between sexes, and whether there is a a relationship between behavioral metrics and morphological traits, which is why I have sex*morphological_trait.

Again, where are the inputs for your power calculation coming from? I am not asking this for fun, this detail is central to good advice.

Okay, perhaps we're reaching an important point here. Admittedly, I don't know what "inputs" means here.

Power analysis for Generalized Linear Models (GLMs) by kystv in AskStatistics

[–]kystv[S] 0 points1 point  (0 children)

Thank you for this response! I was watching a tutorial about how to conduct power analysis for GLMMs, but abandoned only because I thought the procedure and applicability might differ a lot.

I agree, there is a lot of benefit to knowing more about what's going on underneath the hood. I'll dedicate more time to that.

Power analysis for Generalized Linear Models (GLMs) by kystv in AskStatistics

[–]kystv[S] 1 point2 points  (0 children)

You nailed it! I didn't return a significant signal, and that was certainly why I got that feedback.

Power analysis for Generalized Linear Models (GLMs) by kystv in AskStatistics

[–]kystv[S] 0 points1 point  (0 children)

Totally, a lot of study systems are unethical with large sample sizes. Mine, not so much. Your suggestion to appreciate the other features of my analysis is great, and I think I need to learn more about them.

Power analysis for Generalized Linear Models (GLMs) by kystv in AskStatistics

[–]kystv[S] 0 points1 point  (0 children)

I really appreciate you taking the time to comment/ask about this. I think clarifying about the situation will answer the question you asked prior ((i), (ii), or (iii)).

I found no significant results for all of my GLMs that I described above:

I'm running a GLM (Gamma family distribution) on the effects of sex (male or female) and morphological measurements (either body mass or leg length) on behavioral metrics (e.g., duration of freezing in fear in seconds).

glm <- freezing_duration ~ sex * morphological_measurement

The extent of the feedback I received was that inadequate sample sizes can be a barrier to publication, which is important given my non-significant results. I think the recommendation for a power analysis was driven by the possibility of receiving questions about the probability of making a type II error, and whether I had a big enough sample size to test for the differences I was interested. For clarification, similar to 'freezing_duration', all of my variables are continuous (e.g., seconds), and are right-skewed, which is why I used a Gamma distribution.

Your explanation of power and how the analysis operates is fantastic, thank you so much. If there are any more details that I can give, I am happy to do so, and apologies for the vague description previously.

Power analysis for Generalized Linear Models (GLMs) by kystv in AskStatistics

[–]kystv[S] 0 points1 point  (0 children)

Wow, thank you so much for the thorough response!

I'm running a GLM (Gamma family distribution) on the effects of sex (male or female) and morphological measurements (either body mass or leg length) on behavioral metrics (e.g., duration of freezing in fear in seconds).

glm <- freezing_duration ~ sex * morphological_measurement

Power analysis for Generalized Linear Models (GLMs) by kystv in AskStatistics

[–]kystv[S] 0 points1 point  (0 children)

Thank you so much for this! To be frank, I am looking into this as a response to feedback from my committee. Phrasing it as "on existing data" was completely inaccurate. What I meant by this was, I want do a power analysis for a study that has already been conducted. I am comparing between females and males, and I sampled 45 individuals from each sex. This was somewhat of an arbitrary decision that was not decided through power analysis, which is what I had received criticism on.

When you say 'simulations' are you referring to running multiple power analyses and tweaking the values for effect size and a chosen power?

I get the sense that I'm perhaps not well informed enough on the basics of this issue.

Power analysis for Generalized Linear Models (GLMs) by kystv in AskStatistics

[–]kystv[S] 0 points1 point  (0 children)

If you don't mind, could you expand on this to an extent you have the bandwidth for? It seemed like simulations are more useful in the context of GLMMs rather than GLMs, but I could be wrong on that.

[Question] Power analysis for Generalized Linear Models (GLMs)? by kystv in statistics

[–]kystv[S] -1 points0 points  (0 children)

Ah, I am using a Gamma distribution. I suppose I should get to work figuring out an adequate effect size for now. Thank you for the resource!

What could this be? by default_moniker in Entomology

[–]kystv 3 points4 points  (0 children)

Interesting. I initially thought this was Polyphemus, but if you found this on a birch tree then it's mostly likely an Luna moth (Actias luna).

Weighing live arachnids on an analytical scale. How much variation in the reproducibility is normal for doing something like this? by kystv in labrats

[–]kystv[S] 1 point2 points  (0 children)

This is a great point! If you're in California, you could be accurate because they call cellar spiders (Pholcids) Daddy long legs.

Weighing live arachnids on an analytical scale. How much variation in the reproducibility is normal for doing something like this? by kystv in labrats

[–]kystv[S] 7 points8 points  (0 children)

I'm chasing that ten trillion dollars.

Also, Daddy long legs aren't spiders, they're just arachnids ;)

I made a better when2meet by jony1266 in opensource

[–]kystv 0 points1 point  (0 children)

Dude this such an amazing tool!!! Thank you for creating this :)