Displaying 20 results from an estimated 900 matches similar to: "Plotting residuals from a sem object"
2009 Jul 15
0
strategy to iterate over repeated measures/longitudinal data
Hi Group,
Create some example data.
set.seed(1)
wide_data <- data.frame(
id=c(1:10),
predictor1 = sample(c("a","b"),10,replace=TRUE),
predictor2 = sample(c("a","b"),10,replace=TRUE),
predictor3 = sample(c("a","b"),10,replace=TRUE),
measurement1=rnorm(10),
measurement2=rnorm(10))
head(wide_data)
id
2017 Aug 15
1
ANOVA test to decide whether to use multiple linear regression or linear mixed effects model
R-help:
I am trying to decide between using a multiple linear regression or a linear mixed effects model for my data:
model1 <- lm (responsevariable ~ predictor1 + predictor2 + predictor3 + predictor4, data= data)
model2 <- lme (responsevariable ~ predictor1 + predictor2 + predictor3 + predictor4, random = ~1 | site, data= data)
anova (model1, model2)
but I keep getting the
2009 Dec 14
0
GBM package: Extract coefficients
I am using the gbm package for generalized boosted regression models,
and would like to be able to extract the coefficients produced for
storage in a database.
I am already using R to automatically generate formulas that I can
export to a database and store. For example, I have been using Dr.
Harrell's lrm package to perform logistic regression, e.g.:
output <-
2010 Oct 20
1
problem with predict(mboost,...)
Hi,
I use a mboost model to predict my dependent variable on new data. I get the following warning message:
In bs(mf[[i]], knots = args$knots[[i]]$knots, degree = args$degree, :
some 'x' values beyond boundary knots may cause ill-conditioned bases
The new predicted values are partly negative although the variable in the training data ranges from 3 to 8 on a numeric scale. In order to
2013 Jul 20
2
Different x-axis scales using c() in latticeExtra
Hi,
I would like to combine multiple xyplots into a single, multipanel
display. Using R 3.0.1 in Ubuntu, I have used c() from latticeExtra
to combine three plots, but the x-axis for two plots are on a log
scale and the other is on a normal scale. I also have included
equispace.log=FALSE to clean up the tick labels. However, when I try
all of these, the x-axis scale of the first panel is used
2011 Nov 18
0
Kalman Filter with dlm
I have built a Kalman Filter model for flu forecasting as shown below.
Y - Target Variable X1 - Predictor1 X2 - Predictor2
While forecasting into the future, I will NOT have data for all three
variables. So, I am predicting X1 and X2 using two Kalman filters. The code
is below
x1.model <- dlmModSeas(52) + dlmModPoly(1, dV=5, dW=10)
x2.model <- dlmModSeas(52) + dlmModPoly(1, dV=10,
2007 Apr 18
0
Specifying ANCOVA models in R
Hi all,
I am trying to fit an ANOVA model in R using the aov/lm commands. I have a
set of observational (i.e. no fixed experimental effects) data, in which I
have identified high and low clusters of the response variable. The design
is unbalanced, with 773 high cluster observations, and 523 low cluster
observations. I would like to test a set of 7 correlates to see if there are
significant
2005 Mar 10
2
Logistic regression goodness of fit tests
I was unsure of what suitable goodness-of-fit tests existed in R for logistic regression. After searching the R-help archive I found that using the Design models and resid, could be used to calculate this as follows:
d <- datadist(mydataframe)
options(datadist = 'd')
fit <- lrm(response ~ predictor1 + predictor2..., data=mydataframe, x =T, y=T)
resid(fit, 'gof').
I set up a
2008 Apr 05
1
bug? nlme 3.1-88 compilation under linx
>From http://bugs.r-project.org/cgi-bin/R:
If you are not sure whether you have observed a bug or not, it is a good
idea to ask on the mailing list R-Help by sending an e-mail to
r-help at stat.math.ethz.ch rather than submitting a bug report.
I'm wondering whether to submit a bug report on this:
==============================================================
>
2009 Dec 10
2
different randomForest performance for same data
Hello,
I came across a problem when building a randomForest model. Maybe someone can help me.
I have a training- and a testdataset with a discrete response and ten predictors (numeric and factor variables). The two datasets are similar in terms of number of predictor, name of variables and datatype of variables (factor, numeric) except that only one predictor has got 20 levels in the training
2000 Aug 28
2
is win.print() broken or am I doing something wrong?
I am trying to print a graph
> plot(y=atestplot$b,x=atestplot$a, type="s")
> win.print()
This leads to a windows print dialog box- that diappears when i hit
print. subquently i find a
"GraphAppJob" of zero size in the print queue- this just sits until I
enter
dev.off()
at which point a blank sheet is printed
Is it me or is this a bug?
Incidentally if i just
2000 Aug 24
0
Is there a method to calculate Huynh and Feldt adjustments for sphericity violations
Hi,
I'm getting to grips with using R to perform repeat measures
analysis of variance and was wondering is there a potted method to
obtain Huynh and Feldt or other adjustments for sphericity
violations?
Thanks
Dominic
Dr Dominic J Barraclough
Dept Neurobiology and Anatomy,
University of Rochester,
601 Elmwood Av, Box 603,
Rochester
NY 14642
tel (716) 2753627
dominic_barraclough at
2002 Nov 11
2
R 1.6.1: help with debugging error in RunGenCollect(), R_gc_internal
Hi,
[System info: R 1.6.1 compiled from source (no args to configure) on
Redhat 7.1 Linux i/386]
I have some spatial statistics programs that recently (since R 1.6.1)
have generated SIGSEGV. These R programs use the splancs library as
well as some C code of my own for Voronoi analysis.
The program has a big loop to fit various model parameters against a
spatial distribution of biological
2009 Dec 16
2
rcart - classification and regression trees (CART)
Hi,
I am trying to use CART to find an ideal cut-off value for a simple
diagnostic test (ie when the test score is above x, diagnose the condition).
When I put in the model
fit=rpart(outcome ~ predictor1(TB144), method="class", data=data8)
sometimes it gives me a tree with multiple nodes for the same predictor (see
below for example of tree with 1 or multiple nodes). Is there a way
2010 Sep 14
2
How to uncompress a gz file in R
Dear Fellows,
I would like to know how to uncompress a gz file at the R console. I could
not find out any help from the R-help archive.
Thanks for your great help.
Best Regards,
Wonsang You
-----
--
Wonsang You
Special Lab Non-Invasive Brain Imaging
Leibniz Institute for Neurobiology
http://www.ifn-magdeburg.de
--
View this message in context:
2010 Sep 16
2
How to combine matrix and vector
Dear fellows,
I am a novice in R. I would like to combine a matrix and a vector. Assume
that we have the matrix a and the vector b with same length of column.
a<-matrix(seq(1:10),nrow=2,ncol=5,byrow=TRUE)
a=
1 2 3 4 5
6 7 8 9 10
b<-t(c(11,12,13,14,15))
b=
11 12 13 14 15
Then, I want to combine a and b as follows.
c=
1 2 3 4 5
6 7 8 9
2011 Feb 08
1
Simulation of Multivariate Fractional Gaussian Noise and Fractional Brownian Motion
Dear R Helpers,
I have searched for any R package or code for simulating multivariate
fractional Brownian motion (mFBM) or multivariate fractional Gaussian noise
(mFGN) when a covariance matrix are given. Unfortunately, I could not find
such a package or code.
Can you suggest any solution for multivariate FBM and FGN simulation? Thank
you for your help.
Best Regards,
Ryan
-----
Wonsang You
2006 May 11
1
Comparing skewness
Hello,
I'd appreciate any ideas on how to compare the skewness of two samples. In
my case, one sample is likely to be roughly normal and the other one
skewed. I could run two D'Agostino tests, but then I'll have to correct for
the family-wise error. What if both samples are skewed? If there are no
general tests (or they can't exist), I'd like to know.
Thanks,
Skirmantas
2011 Feb 26
1
2D Convolution Function
Dear R-Helpers,
I want to try the 2D (two-dimensional) convolution in R.
For example, let us we have the following kernel and data.
kernel <- (1,2,3,2,1)
data <- array(1:100, dim=c(10,10))
I know the function 'convolve' only for one-dimensional convolution, but it
is just for a 1D sequence.
Is there any function for 2D convolution?
For theory, please refer to the following link:
2011 Dec 06
1
Read Windows BMP format images
Hello,
Does anyone know of an R package that can read Windows BMP format images? Many thanks,
Greg Jefferis.
--
Gregory Jefferis, PhD
Division of Neurobiology
MRC Laboratory of Molecular Biology,
Hills Road,
Cambridge, CB2 0QH, UK.
http://www2.mrc-lmb.cam.ac.uk/group-leaders/h-to-m/g-jefferis