Closed lucindasisk closed 2 years ago
You've scaled the response variable Sepal.Length
as well as the predictors. This means that your effect size of 0.3 has a different meaning in the two examples.
I see, thanks so much for your help!
While you're here - I'm curious about the code idiom:
example_lm <- eval(parse(text="glm(Sepal.Length~Species + Sepal.Width + Petal.Width,
data=iris,
family='gaussian')"))
Was there any reason it couldn't be simply:
example_lm <- lm(Sepal.Length ~ Species + Sepal.Width + Petal.Width, data=iris)
Ah, that was an artefact from sifting through the posts on Github and seeing someone who encountered an issue that could be worked around using the eval/parse/text arguments. It runs and produces the same output both ways for me, though. Thanks again!
Hi! First off, thanks so much for your work creating and maintaining this package--it is an amazing resource! I was aiming to fit a relatively simple model with simulated data but found that the power estimates changed when I z-scored the variables. Would you happen to have insight on what might be going on here? Thanks so much for any help! Here is a reproducible example: