Displaying 20 results from an estimated 4000 matches similar to: "help with a regression"
2012 Aug 01
3
help with a regression problem
Hello,
I have a big data frame where consecutive time dates and corresponding observed values for each subject (ID) are on a line. I want to compute the linear slope for each subject. I would like to use apply but I do
not know how to express the corresponding function. An example using a loop follows
#
# create dummy data set There are missing values
a <- c(1,2,3,4, 1,1,1,1, 2,2,3,3,
2008 Nov 06
1
RMySql inserts \r when using dbWriteTable
I am using R 2.8 and the latest versions of RMySQL on a Windows XP 64 bit
machine.
I was wondering if someone could help me figure out how to use dbWriteTable
without inserting \r into my table. Consider the following code snippet,
which is
run after I connect to my database.
myDFOut = dbReadTable(conn, "myDF")
print(myDFOut)
myDFIn = data.frame(x=paste("x", 1:5, sep =
2018 Feb 08
4
plotting the regression coefficients
Hi Dear all;
I would like to create a plot for regression coefficients with each
independent variable (x) along the side and the phenotypes (y) across the
top (as given below). For each data point, direction and magnitude of
effect could be color and significance could be the size of the circle? Is
this possible?
I would greatly be appreciated your help.
Thanks,
Greg
y1 y2 y3 y4 y5 y6
x1
2008 Dec 02
3
sampling from data.frame
Hi all,
I have a data frame with "clustered" rows as follows:
Cu1 x1 y1 z1 ...
Cu1 x2 y2 z2 ...
Cu1 x3 y3 z3 ... # end of first cluster Cu1
Cu2 x4 y4 z4 ...
Cu2 x5 y5 z5
Cu2 ... # end of second cluster Cu2
Cu3 ...
...
"cluster"-size is 3 in the example above (rows making up a cluster are
always consecutive). Is there any faster way to sample n clusters
(with
2011 Aug 25
4
{R} How to extract correctly from vector?
Dear list,
I have problem that I cannot solve and would like to ask your opinion. I
tried to ask a few days ago already but got no answer and all my attempts to
solve it by myself since then failed. Sorry for repeated posting! Here the
problem broken down a bit.
My problem basically is, that I want to use the elements of a character
vector as names for objects and by recalling only the
2004 May 26
1
A data selection problem, suggestions highly appreciated
Hi, All
I get following question:
A data format like following:
[Day time x y]
Jan1 18:56:24 x1 y1
Jan1 18:56:25 x2 y2
Jan1 18:56:27 x3 y3
Jan1 18:56:28 x4 y4
Jan1 18:56:31 x5 y5
.....................
.....................
what I wanna do is to partion the time interval by unit of 5 seconds.
and pick x,y corresponding to the last time within that interval. for the
example above,
suppose
2008 Aug 13
1
summary.manova rank deficiency error + data
Dear R-users;
Previously I posted a question about the problem of rank deficiency in
summary.manova. As somebody suggested, I'm attaching a small part of
the data set.
#***************************************************
"test" <-
structure(.Data = list(structure(.Data = c(rep(1,3),rep(2,18),rep(3,10)),
levels = c("1", "2", "3"),
class =
2011 Jun 14
2
Need script to create new waypoint
Dear help-list members,
I am a student at Durham University (UK) conducting a PhD on spatial representation in baboons. Currently, I'm analysing the effect of sampling interval on home range calculations.
I have followed the baboons for 234 days in the field, each day is represented by about 1000 waypoints (x,y coordinates) recorded at irregular time intervals. Consecutive waypoints in
2008 May 14
2
mfrow
Dear members,
I want to create 8 graphs and write it into one page using mfrow=c(4,2).
How to make all graphs (including the titles, legends, line types) to be
scale down (resized proportionally).
As an illustration, below is the code:
pdf("testmfrow.pdf")
par(mfrow=c(4,2))
x<-seq(1:10)
y1<-rnorm(10)
y2<-rnorm(10,mean=2,sd=1)
y3<-rnorm(10,mean=3,sd=1)
2018 Feb 08
0
plotting the regression coefficients
Fwiw, encoding magnitude in color is generally a bad idea. Using area(*not*
radius) is also not great, but maybe it will work for you.
See here for some explanation:
https://www.amazon.com/Visual-Display-Quantitative-Information/dp/0961392142/ref=sr_1_1?s=books&ie=UTF8&qid=1518092778&sr=1-1&keywords=Tufte
Bert
On Feb 7, 2018 11:13 PM, "greg holly" <mak.hholly at
2012 Mar 13
4
MANOVA and Extra Sums-of-Squares Tests
I would like to conduct an extra sum-of -squares test that compares a full
MANOVA model (with all 1st order interactions) to a reduced model (no
interactions) to determine if I can drop all interactions at the same time.
This is analagous to an extra sum-of-squares F-test in ANOVA, but instead
using MANOVA. Is there a command in R that does this? If not, is there a
command that calculates
2006 Aug 10
2
index.cond in xyplot
Dear R-users
I have 5 dependent variables (y1 to y5) and one independent variable (x) and
3 conditioning variables (m, n, and 0). Each of the conditioning variables
has 2 levels. I created 2*4 panel plots.
xyplot(y1+y2+y3+y4+y5 ~ x | m*n*o,layout = c(4,2))
I would like to reorder the 8 panels. I tried to use index.cond (e.g.,
index.cond = list(c(1,3,2,4,5,7,6,8)) but it didn't work out.
[R-pkgs] New package: `lavaan' for latent variable analysis (including structural equation modeling)
2010 May 24
2
[R-pkgs] New package: `lavaan' for latent variable analysis (including structural equation modeling)
Hi Yves
lavaan looks like a very nice package. From the tutorial introduction
I see you create path diagrams for some of the models you describe.
How did you do this? I don't see a function for this in the package.
I know there is a path.diagram function in the sem package that uses
dot to draw the diagram, but I've always found the layouts from dot
somewhat strange for path diagrams
2006 Jul 03
6
macro facility in R
R 2.2 on windows XP
I have a dataset with multiple columns. Some of the columns represent
independent variables, some represent dependent variables. I would like
to run the same analyses on a fixed set of independent variables,
changing only the dependent variable, e.g.
y1-y2=x1+x2+x3
y3-y4=x1+x2+x3
y5-y6=x1+x2+x3, etc.
I know I can write a function to perform the analyses, however in order
to
2018 Feb 12
3
plotting the regression coefficients
Hi
After melt you can change levels of your factor variable. Again with the toy example.
> levels(temp$variable)
[1] "y1" "y2" "y3" "y4"
> levels(temp$variable) <- levels(temp$variable)[c(2,4,1,3)]
> levels(temp$variable)
[1] "y2" "y4" "y1" "y3"
>
And you will get graphs with this new levels ordering.
2003 Apr 24
4
problems with max.col()
Hello, I think the following qualify as a bug
given:
x<-c(1,2,3,4,2,4,2,2,4,2,2,2,4,3,2,1)
z<-embed(x,4)
z
[,1] [,2] [,3] [,4]
[1,] 4 3 2 1
[2,] 2 4 3 2
[3,] 4 2 4 3
[4,] 2 4 2 4
[5,] 2 2 4 2
[6,] 4 2 2 4
[7,] 2 4 2 2
[8,] 2 2 4 2
[9,] 2 2 2 4
[10,] 4 2 2 2
2003 Apr 24
4
problems with max.col()
Hello, I think the following qualify as a bug
given:
x<-c(1,2,3,4,2,4,2,2,4,2,2,2,4,3,2,1)
z<-embed(x,4)
z
[,1] [,2] [,3] [,4]
[1,] 4 3 2 1
[2,] 2 4 3 2
[3,] 4 2 4 3
[4,] 2 4 2 4
[5,] 2 2 4 2
[6,] 4 2 2 4
[7,] 2 4 2 2
[8,] 2 2 4 2
[9,] 2 2 2 4
[10,] 4 2 2 2
2018 Feb 08
2
plotting the regression coefficients
Hi Petr;
Thanks for your reply. It is much appreciated. A small example is given
below for 4 independent and 4 dependent variables only. The values given
are regression coefficients.I have looked ggplot documents before writing
to you. Unfortunately, I could not figure out as my experience in ggplot is
ignorable
Regards.
Greg
y1 y2 y3 y4
x1 -0.19 0.40 -0.06 0.13
x2 0.45 -0.75 -8.67 -0.46
x3
2010 Mar 12
2
unknown compression
Hello, I am trying to modify some functions in an existing package. I can get a function by just typing the name in the console, but how can I get all the functions in a package? the ./R/ subdirectory has files xx.rdb and xx.rdx which I can not decompress with 7-zip or with unzip, unrar etc. The help files are compressed with gzip in the ./man/ folder and can be unzipped easily.
Thanks for your
2008 May 24
2
Importing data in text file into R
Dear all,
I am quite new to R; facing certain problems:
Say, I have a text file( named as "try"):
Year C1 C2 C3 C4 C5 C6
Y1 3.5 13.8 9.5 6.8 0.4 24.2
Y2 3.8 13.9 9.9 7.6 0.7 12.8
Y3 4.5 14.5 14.2 9.2 0.6 14.5
Y4 5.9 16.2 24.6 12.7 0.2 24.3
Y5 7.2 20.4 40.6 18.2 0.8 28.2
Y6 5.9 18.6 37.4 14.5 0.3 36.9
Y7 8.0 16.1 88.6 24.1 0.1 34.6
Y8 13.6 21.1 56.3 19.0 0.7 33.3
I wish to import the