Displaying 20 results from an estimated 400 matches similar to: "Function for multiple t tests"
2013 Feb 04
3
Modifying Package Data
The bio.infer package contains a data frame
/usr/lib/R/library/bio.infer/data/itis.ttable.rda that needs to be modified.
After loading the bio.infer package and attaching the data frame with the
data() function, I wrote the data frame to a text file.
After adding another row to the data frame I applied read.table() to
create a data frame, but it's in my pwd, not the R library data
2013 Jan 31
2
rbind Missing Something: Need New Eyes
I don't see what's missing in my statements to add rows to a data frame
and someone else will probably see what needs to be added to the statements.
The data frame has this structure (without any data):
$ PHYLUM : chr
$ SUBPHYLUM : chr
$ SUPERCLASS : chr
$ CLASS : chr
$ SUBCLASS : chr
$ INFRACLASS : chr
$ SUPERORDER : chr
$ ORDER : chr
$ SUBORDER :
2012 Jun 06
3
Sobel's test for mediation and lme4/nlme
Hello,
Any advice or pointers for implementing Sobel's test for mediation in
2-level model setting? For fitting the hierarchical models, I am using
"lme4" but could also revert to "nlme" since it is a relatively simple
varying intercept model and they yield identical estimates. I apologize for
this is an R question with an embedded statistical question.
I noticed that a
2006 Apr 10
3
SE estimates for treatment groups from nlme
I am wondering how to obtain SE estimates for fixed effects from a nonlinear mixed effects model?
I have fixed effects corresponding to three factors A, B and C with 2, 3 and 3 levels respectively. I have fit a model of the following general form:
nlme1<-nlme(y~ SasympOrig(x, Asym, lrc), data=df, fixed=list(Asym~A*B*C, lrc~A*B*C),
start=c(fixef(ETR.nlme)[1], rep(0,17), fixef(ETR.nlme)[2],
2010 Apr 08
1
formatting a result table (number of digits)
Hello,
Is there an easy way to format the output of a result table that R
generates from a regression? I like the table, but would like to
limit the number of decimal points in the entries if possible.
For instance I would like only 3 digits of precision for the Value,
Std.Error. (And if it would be easy to get rid of scientific notation,
that would be good to know too). So ideally keep the
2013 Feb 17
2
nested random factor using lme produces errors
Hi,
I am running a mixed-effect model with a nested-random effect. I am
interested in gut parasites in moose. I has three different type of
treatment that I applied to moose which are from different "families". My
response variable is gut parasites and the factors are moose families which
is nested within treatment. My data is balanced.
To answer this question, I used the lme function
2010 May 15
1
conditional calculations per row (loop versus apply)
Hi all,
I'm hoping someone might help with a query about conditionally applying formulas to a dataframe.
In essence I have 3 lookup tables (Table A, B & C) and a dataframe with a variable Type.Code, which identifies the Lookup Table to which each record belongs. The lookup tables reference different sensor types for which I need apply a different formula to values in Column3 in each row
2007 Jul 30
1
Extract random part of summary nlme
Dear helpers,
I'm estimating multilevel regression models, using the lme-function
from the nlme-package. Let's say that I estimated a model and stored
it inside the object named 'model'. The summary of that model is
shown below:
Using summary(model)$tTable , I receive the following output:
> summary(model)$tTable
Value Std.Error DF t-value
2006 Apr 25
1
summary.lme: argument "adjustSigma"
Dear R-list
I have a question concerning the argument "adjustSigma" in the
function "lme" of the package "nlme".
The help page says:
"the residual standard error is multiplied by sqrt(nobs/(nobs -
npar)), converting it to a REML-like estimate."
Having a look into the code I found:
stdFixed <- sqrt(diag(as.matrix(object$varFix)))
if (object$method
2007 Jul 31
1
Extracting random parameters from summary lme and lmer
LS,
I'm estimating multilevel regression models, using the lme-function
from the nlme-package. Let's say that I estimated a model and stored
it inside the object named 'model'. The summary of that model is
shown below:
Using summary(model)$tTable , I receive the following output:
> summary(model)$tTable
Value Std.Error DF t-value
2008 Feb 05
2
How to generate table output of t-test
Hi,
Given
test <- matrix(c(1, 1,2,2), 2,2)
t <- apply(test, 1, t.test)
How can I obtain a table of p-values, confidence interval etc, instead of
[[1]]
One Sample t-test
data: newX[, i]
t = 3, df = 1, p-value = 0.2048
alternative hypothesis: true mean is not equal to 0
95 percent confidence interval:
-4.853102 7.853102
sample estimates:
mean of x
1.5
[[2]]
2006 Jan 10
1
extracting coefficients from lmer
Dear R-Helpers,
I want to compare the results of outputs from glmmPQL and lmer analyses.
I could do this if I could extract the coefficients and standard errors
from the summaries of the lmer models. This is easy to do for the glmmPQL
summaries, using
> glmm.fit <- try(glmmPQL(score ~ x*type, random = ~ 1 | subject, data = df,
family = binomial), TRUE)
> summary(glmmPQL.fit)$tTable
2002 Feb 27
1
Bug in glm.fit? (PR#1331)
G'day all,
I had a look at the GLM code of R (1.4.1) and I believe that there are
problems with the function "glm.fit" that may bite in rare
circumstances. Note, I have no data set with which I ran into
trouble. This report is solely based on having a look at the code.
Below I append a listing of the glm.fit function as produced by my
system. I have added line numbers so that I
2010 Jun 24
1
Question on WLS (gls vs lm)
Hi all,
I understand that gls() uses generalized least squares, but I thought
that maybe optimum weights from gls might be used as weights in lm (as
shown below), but apparently this is not the case. See:
library(nlme)
f1 <- gls(Petal.Width ~ Species / Petal.Length, data = iris, weights
= varIdent(form = ~ 1 | Species))
aa <- attributes(summary(f1)$modelStruct$varStruct)$weights
f2 <-
2007 May 09
3
Increasing precision of rgenoud solutions
Dear All
I am using rgenoud to solve the following maximization problem:
myfunc <- function(x) {
x1 <- x[1]
x2 <- x[2]
if (x1^2+x2^2 > 1)
return(-9999999)
else x1+x2
}
genoud(myfunc, nvars=2,
Domains=rbind(c(0,1),c(0,1)),max=TRUE,boundary.enforcement=2,solution.tolerance=0.000001)
How can one increase the precision of the solution
$par
[1] 0.7072442 0.7069694
?
I
2009 Sep 22
2
glm analysis repeated for 900 variables
Dear R users,
Could you help my with the following problem?
I want to repeat a glm analysis with 2 independent variables for all 900
variables (snps) in my data set. So, I want to check whether snp1 has a
different effect on my outcome variable in patients and
controls(phenotype). And repeat that for snp2 to snp900.
Is there an easy way to get a summary of the data, e.g. a list of P
values of all
2001 Feb 28
2
Automating the job?
Hi!
I just started to use R recently, and would like to ask a help about
automating the job.
I need to use "kmeans" function with my own 300 data files, and wonder if
it's possible to do it automatically. For example,
> library (mva)
> mydata <- read.table ("data1")
> cl <- kmeans(mydata, 5, 20)
and I just need to save "cl" info (i.e. the center
2006 Jun 15
1
Repost: Estimation when interaction is present: How do I get get the parameters from nlme?
Gday,
This is a repost since I only had one direct reply and I remain
mystified- This
may be stupidity on my part but it may not be so simple.
In brief, my problem is I'm not sure how to extract parameter
values/effect sizes from a nonlinear
regression model with a significant interaction term.
My data sets are dose response curves (force and dose) for muscle that
also have two
2010 Oct 13
2
How to fix error in the package 'rgenoud'
Dear R user fellows,
I would like to ask you about the package 'rgenoud' which is a genetic
optimization tool.
I ran the function 'genoud' with two variables to be minimized by the
following command.
result<-genoud(fn,nvars=2,starting.values=c(0.5,0),
pop.size=1000, max.generations=10, wait.generations=3)
Then, I had the following error message.
Error in
2003 Jun 25
2
within group variance of the coeficients in LME
Dear listers,
I can't find the variance or se of the coefficients in a multilevel model
using lme.
I want to calculate a Chi square test statistics for the variability of the
coefficients across levels. I have a simple 2-level problem, where I want to
check weather a certain covariate varies across level 2 units. Pinheiro
Bates suggest just looking at the intervals or doing a rather