Submitted by Manuel Spinola on Tue, 09/21/2010 - 08:53
Posted in
I would like to know how to fit a linear model with Red R.
I am confused by the "=" symbol in the model formula. R uses the "~" symbol to fit a model, is the = a substitute for ~?
Also, how to do a t test for independent samples instead of a pairwise t test?
Thank you very much in advance.
Manuel
OK I'll try to get a t.test widget up asap.
Kyle
Thank you Kyle.
Yes, that's true.
The thing that I like from the t.test is that it provide the effect size and the confidence interval which is more useful than the p value.
Best,
Manuel
Ah thanks, I'm a biologist not a statistician. So what function would not have such a dependency? t.test? There is also ANOVA which I understand is the same as a t.test if only two samples are present.
Kyle
Hi Kyle,
Pairwise assume dependency in the observations.
Best,
Manuel
For the t-test why not just do the pairwise on two samples? Pairwise assumes independence in observations unless I am greatly mistaken.
I'll include a t-test widget for two samples so things will be more clear.
Kyle
If you are using the lm widget I think you need to connect to the anova-lm widget to get the residuals.
I think the anova widget would give you the same thing as doing lm followed by anova-lm. But doing the analysis separately would give you access to the lm fit as well so you could make likes from it I guess (I'll need to fix that darn lines plot attribute widget for that to work but perhaps a generic plot of the lm model would plot it).
Hope this helps.
Kyle
Thank you very much Kyle.
There is not P value either.
I see it in the RExecutor, but is the same than the output (no residuals).
Is there any way to see confidence intervals for the coefficients?
Best,
Manuel
It seems to show in plainText on mine. You can use RExecutor to see the summary as you would in R and then get the output and let me know if it look right.
Kyle
do you think the p contains a < symbol?
This might be a flaw in the summary function because it might try to show in html. I'll fix this in the base package and upload a new version as soon as I can.
Thanks
Kyle
Thank you very much Kyle.
In LM when I try to see the summary (not the output) I can see only the Intercept.
Do you know why?
Best,
Manuel
The formula entry replaces '~' with '='. This was done because most novice users are expected to find '=' more familiar for formula notation than '~'. If you run the formula and check the R output you will see that '~' is put in.
The t-test for independent samples might not be well coded in the t-test or anova widgets. What would the R code look like and I might be able to supply instructions or modify the widgets to perform these opetations.
Thanks for the post.
Kyle