Deal list
I want to generate a random number in an interval using exponential low
I know how to make that simply using uniform low
x1 - runif(1, 5.0, 7.5)
this will generate a number between 5 et 7.5 but with uniform low.
Could you help pease.?
Regards
--
PhD candidate in Computer
Thank you very much for the suggestions.
On 2011-12-13 3:20, Richard M. Heiberger wrote:
...
On Mon, Dec 12, 2011 at 7:00 AM, Jinsong Zhao jsz...@yeah.net
mailto:jsz...@yeah.net wrote:
Apart from the data set here, is there a way to do multiple
comparison on the interaction of one way
On 13/12/11 15:39, Ana wrote:
How do I sum 15 years to my dataset?
You mean ``How do I ***add*** 15 years ''
See the thread starting at
http://r.789695.n4.nabble.com/Adding-a-year-to-existing-date-tp4078930p4078930.html
cheers,
Rolf Turner
original dataset
Hi,
I am trying to create a TS residual plot for a weekly data set over several
years. However, the data set obtains alot of missing data which has been
omitted from the analysis. The only issue is when I make the plot for the TS
residual graph you have to state the frequency in the coding i.e.
Never mind on my reply post (hasn't posted yet, but assuming it does).
I found a way to use the merge and height values with Excel to
subtract out the lower level distance. Thanks for the help!
kbrownk
On Dec 12, 1:38 am, Peter Langfelder peter.langfel...@gmail.com
wrote:
On Sun, Dec 11, 2011
Thanks, I had tried using height but I was using it wrong. If I had
the distances alone it would be enough, except that the height returns
the distance all the way to 0, rather than to the adjacent merge. So,
if an initial merge at height 0 has a distance of 10, and that object
then merges again
HI,
Sorry Carl, I received your message in my spam folder. Sarah proposed me a good
example of code.
Thank you
MomadouÂ
De : Carl Witthoft [via R] ml-node+s789695n4188375...@n4.nabble.com
Envoyé le : Mardi 13 Décembre 2011 3h34
Objet : Re: Polygon
Thanks people!
another question, is there something similar to sort for dates?
sort(x, decreasing = FALSE, ...)
On Tue, Dec 13, 2011 at 8:34 AM, Jorge I Velez jorgeivanve...@gmail.com wrote:
Hi Ana,
Check section 4 of http://www.jstatsoft.org/v40/i03/paper for more
alternatives.
HTH,
Hi,
I have a R package with some functions made all of then only with R
code. I use the command R CMD build to build a package that I can
install on linux, windows or mac, because all the code is only R code.
But I have some problems with R version. For each new R version I need
to rebuild
Hi,
I have a R package with some functions made all of then only with R
code. I use the command R CMD build to build a package that I can
install on linux, windows or mac, because all the code is only R code.
But I have some problems with R version. For each new R version I need
to rebuild
Dear Zack
On 4 December 2011 03:08, z2.0 zack.abraham...@gmail.com wrote:
Wanted to ask if there's an easy way to use 'predict' with objects of class
'censReg', 'maxLik', 'maxim' or 'list'.
Have a left-censored dataset, attempting to use a Tobit model and am working
with the censReg package.
It's not entirely clear to me what you mean by an exponential low but the
lmomco package provides r,d,p,q-functions for both the shifted and truncated
exponential distributions. Perhaps that's what you're after?
If there's another distribution you have in mind, I'd check the CRAN
distributions
Hello dear R community,
Recently, the wonderful
peoplehttp://www.warwick.ac.uk/statsdept/useR-2011/index.html#Aboutbehind
useR!2011 made sure to nudge the speakers to send in their slides
from the conference, and updated the conference's website with links to the
slides (and
Dear all,
I have downloaded Ox console and Arfima package and made it run. I
would like to be able to call certain
Ox functions from package Arfima from R, such as, Arfima::FreeD.
Could you, please, give some advice how to do it? Thank you beforehand.
Chuse.
Dear all, is there any way to stop popping up the start-up messages when I
start a new R console window? I want a clean window for my work which
obviously can be done by pressing 'cont+l'. However I want R should be able
to do it automatically, as soon as it starts.
Thanks and regards,
Use the -q option when calling R.
Michael
On Dec 13, 2011, at 8:06 AM, Christofer Bogaso bogaso.christo...@gmail.com
wrote:
Dear all, is there any way to stop popping up the start-up messages when I
start a new R console window? I want a clean window for my work which
obviously can be done
On Dec 13, 2011, at 3:43 AM, Ana wrote:
Thanks people!
another question, is there something similar to sort for dates?
sort(x, decreasing = FALSE, ...)
So what makes you even suspect that there wasn't a sort method for
dates?
--
David.
On Tue, Dec 13, 2011 at 8:34 AM, Jorge I Velez
Thanks Michael for your reply. But how can I do that?
Thanks and regards,
-Original Message-
From: R. Michael Weylandt michael.weyla...@gmail.com
[mailto:michael.weyla...@gmail.com]
Sent: Tuesday, December 13, 2011 7:02 PM
To: Christofer Bogaso
Cc: r-help@r-project.org
Subject: Re: [R]
Sorry but I am not a student, at least not since 2007. However I am
performing grunt work for a someone with a Ph.D. so it does remind me of the
student days. I just have a pay check instead of student loans.
--
View this message in context:
Carl Witthoft carl at witthoft.com writes:
Hi,
So far as I can tell, the 'col.ticks' parameter for axis() only uses the
first value provided. E.g.:
plot(0:1,0:1, col.ticks=c('blue','red','green')) #all ticks are blue
Just wondering if there's a different option in the basic plot
-Original Message-
Use the -q option when calling R.
Thanks Michael for your reply. But how can I do that?
Depends how you start R.
On the command line, say 'R -q' instead of just 'R'
In windows from a shortcut, modify the shortcut that you click on to start R so
that the
Hi,
is there a way in the arma function to exclude coefficients for the
estimation. For example I estimated an ARMA(2,2) model to data where only
the coefficients of the second order have been significant. Therefore I
would like to estimate the ARMA(2,2) model without the 1,1-coefficients.
William,
THANK YOU! This nailed it. Very much appreciate the support.
R
On Mon, Dec 12, 2011 at 6:12 PM, William Dunlap wdun...@tibco.com wrote:
If you have already made numeric vectors called a, b, and c
a - 1:10
b - sqrt(1:200)
c - log2(1:500)
and a character vector z containing
On 11-12-13 5:16 AM, Ronaldo Reis Júnior wrote:
Hi,
I have a R package with some functions made all of then only with R
code. I use the command R CMD build to build a package that I can
install on linux, windows or mac, because all the code is only R code.
But I have some problems with R
Dear Sarah and R users,
Thanks Sarah for the suggestion. The example you gave me works and I managed to
get it to run by modifying the 'lm' to the gam command.
y.list - list(y1=runif(10), y2 - runif(10), y3 - runif(10))
x1 - 1:10
x2 - c(11, 15, 17, 2, 18, 6, 7, 8, 12, 10)
lapply(y.list,
Niklaus Fankhauser niklaus.fankhauser at cell.biol.ethz.ch writes:
I'm using nls to fit periodic gene-expression data to sine waves. I need
to set the upper and lower boundaries, because I do not want any
negative phase and amplitude solutions. This means that I have to use
the port
Niklaus:
1. First, you mat not need to use nls at all, although I am not
familiar with the port algorithm, so I could very well be wrong
about this. Generally speaking, one uses time series methods (e.g.
fourier analysis) to fit periodic sine waves, so you may wish to check
out CRAN's TimeSeries
Dear all,
My goal is to create weights.
I have three covariates x1 x2 x3
These three covariates are discrete, they can only store either 1 or 0. So
x1 x2 x3
--
0 1 0
0 0 1
1 0 0
1 1 0
1 0 1
0 1 1
..
Sometimes they have missing data
x1 x2 x3
--
0 1 -
This issue occurs only when both the evd and ismev packages are loaded.
Please retract this posting, if possible. Thank you in advance!
Mike
-- Forwarded message --
From: Mike Harwood harwood...@gmail.com
Date: Mon, Dec 12, 2011 at 7:47 PM
Subject: tcplot documentation in evd
Dear all,
If I am not mistaken, I think that I have found a bug in glmnet 1.7.1 (latest
version) for multinomial when alpha=0. Here is the code
library(glmnet)
Loading required package: Matrix
Loading required package: lattice
Loaded glmnet 1.7.1
x=matrix(rnorm(40*500),40,500)
And if you use RStudio it seems that this option is not currently
supported:
http://stackoverflow.com/questions/7771577/clear-startup-screen-in-r-rstudio
(follow the links through to the RStudio forums)
Michael
On Tue, Dec 13, 2011 at 9:50 AM, S Ellison s.elli...@lgcgroup.com wrote:
Hi,
I wonder if there is a mac equivalent to ctrl+r shortcut for running a
script line..
(I am using MAC OS X 10.7.2). I saw this post
http://r.789695.n4.nabble.com/Shortcut-to-run-script-tp1016619p1016619.html
but couldn't find an answer...
Thanks a lot,
Asaf
--
View this message in
I am looking for ways to add points to three different plots in parallel.
I generate three scatter plots and name them as s3d1, s3d2 and s3d3
s3d1-scatterplot3d(mtcars[,3],mtcars[,4],mtcars[,5],main=common,pch=20)
s3d2-scatterplot3d(mtcars[,3],mtcars[,4],mtcars[,5],main=common,pch=20)
Sorry. I did not format message properly (by mistake message was posted as
HTML, but it was written in plain text )
I am looking for ways to add points to three different plots in parallel.
I generate three scatter plots and name them as s3d1, s3d2 and s3d3
Before loading sql packages, i was wondering, once all packages required are
installed, if it's possible to do from R console sth like this:
SQL select v1 from sql_table
where v2 in (R_variable) # being R_variable a vector
Thanks in advance, u...@host.com
--
View this message in
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Trevor Carey-
Smith
Sent: Monday, December 12, 2011 4:22 PM
To: r-help@r-project.org
Subject: Re: [R] Boxplot of multiple vectors with different lengths
On 12/13/2011 12:14
In exactly the same way:
y.gam - lapply(y.list, function(y)gam(y~s(x1,x2, k=1))) # list of gam objects
y.vis.gam - lapply(y.gam, vis.gam) # list of vis.gam outputs
y.fitted - lapply(y.gam, fitted) # list of fitted values.
Saraj
On Tue, Dec 13, 2011 at 10:48 AM, Mintewab Bezabih
Hi,
Does anybody know how to obtain the imputed SNP genotype probabilities from the
snpStats package?
I am interested in using an imputation method implemented in R to be further
used in a simulation study context.
I have found the snpStats package that seems to contain suitable functions
Hi all:
My data has 3 variables:
age(3levels : 30y=1 30-50y=2, 50y=3)
gender(Male=0, Female=1)
CD4 cell count(raw lab measurement)
y(1:death 0:alive)
I perform logistic regression to find out the factors that influence y.
result-glm(y ~ factor(age) + factor(gender) + CD4,family = binomial)
Hi,
I have a dataset with the following properties:
Y_i ~ N(mu_i, theta * (mu_i)^2)
ln(mu_i) = B'Xi
theta and beta's are the parameters here.
I want to come up with a model to fit the data with the above property and
test that model on the built in R dataset quine.
Does nls() make sense
Dear R users,
I'm a little lost on how to define pmodels for the DRC package. My goals are
to produce isoboles of binary toxicity data.
any tips? I really just need to know what pmodels refers to.
Cheers,
Pat
--
View this message in context:
One simple option is to use confint function
exp(confint(result))
Weidong
On Tue, Dec 13, 2011 at 7:16 AM, 孟欣 lm_meng...@163.com wrote:
Hi all:
My data has 3 variables:
age(3levels : 30y=1 30-50y=2, 50y=3)
gender(Male=0, Female=1)
CD4 cell count(raw lab measurement)
y(1:death 0:alive)
On Tue, Dec 13, 2011 at 10:53 AM, Hans W Borchers
hwborch...@googlemail.com wrote:
Niklaus Fankhauser niklaus.fankhauser at cell.biol.ethz.ch writes:
I'm using nls to fit periodic gene-expression data to sine waves. I need
to set the upper and lower boundaries, because I do not want any
On Tue, Dec 13, 2011 at 10:54 AM, agent dunham crossp...@hotmail.com wrote:
Before loading sql packages, i was wondering, once all packages required are
installed, if it's possible to do from R console sth like this:
SQL select v1 from sql_table
where v2 in (R_variable) # being
An update on this particular problem I've been having. It seems that
the number of pedals (the bins argument of the windrose command) is
somehow effecting the number of colors that will be plotted. This
makes no sense since it only controls the number of pedals in the
windrose not the number of
For just running a single line? apple-return
Bryan
On Dec 13, 2011, at 10:19 AM, asafw wrote:
Hi,
I wonder if there is a mac equivalent to ctrl+r shortcut for running a
script line..
(I am using MAC OS X 10.7.2). I saw this post
Thanks so much Sarah. Everything worked now!
Mintewab
Från: Sarah Goslee [sarah.gos...@gmail.com]
Skickat: den 13 december 2011 17:36
Till: Mintewab Bezabih
Kopia: r-help@r-project.org
Ämne: Re: [R] shorter way of coding
In exactly the same way:
y.gam -
Hi there,
Try
require(epicalc)
logistic.display(result)
HTH,
Jorge
On Tue, Dec 13, 2011 at 7:16 AM, å欣 wrote:
Hi all:
My data has 3 variables:
age(3levels : 30y=1 30-50y=2, 50y=3)
gender(Male=0, Female=1)
CD4 cell count(raw lab measurement)
y(1:death 0:alive)
I perform logistic
Terry Therneau thern...@mayo.edu writes:
--begin inclusion --
I have a matched-case control dataset that I'm using conditional
logistic regression (clogit in survival) to analyze. I'm trying to
conduct k-folds cross validation on my top models but all of the
packages I can find (CVbinary in
Thank you for your answer. It helps a lot and is very appreciated.
Also, thanks for the advice about dput(), I was wondering how to present my
data or code easily.
--
View this message in context:
http://r.789695.n4.nabble.com/Dividing-rows-when-time-is-overlapping-tp4170428p4191334.html
Sent
Dear all,
I have a datafile where I run haplo.GLM analyses using several variables (a
matrix). However, when I include a certain binary variable (0,1) I get this
message
Error: NA/NaN/Inf in foreign function call (arg 4)
I don't get an error when I include another binary variable, again with
The issue is solved. For those who wish to use windrose out of the
circular package and have more groups magnitude than they do pedals,
please note the following line in the windrose function -
fill.col = rep(fill.col,length.out=bins) # where bins is the number of
pedals, fill.col is the fill
xfei xiaoyifei at gmail.com writes:
I have a dataset with the following properties:
Y_i ~ N(mu_i, theta * (mu_i)^2)
ln(mu_i) = B'Xi
theta and beta's are the parameters here.
I want to come up with a model to fit the data with the above property and
test that model on the built in R
Hi,
Being a novice to R, I would like to create a graph in R with 2 axes.
One of the 2 only has positive values, the other one also has negative
values. The part I'm struggling with is how to align the 2.
Rather than starting to plot the data from the x axis, I would like to
start plotting the
I am in the process of converting from Matlab to R, but a major sticking
point for me at the moment is accessing data via OPeNDAP.
After several hours of searching, I found that other people have discussed
this functionality in the past, but it does not appear to have yet been
developed. One
The package ncdf4 (http://cran.r-project.org/web/packages/ncdf4/index.html)
can access remote OpeNDAP data services. If you use Windows, the author has a
binary package on his site.
Also, if you want a GUI that works with R and allows you to visually select the
space-time slice you want, try
GDAL can do it, and so then can the rgdal package if you can compile
against a GDAL including the OpenDAP driver. You get each 2+D-array
(subdataset in GDAL terms) flattened into a series of 2D rasters where
each slice in higher dimensions is an attribute on the raster, but
that often is quite
Robin Cura wrote on 12/12/2011 10:15:32 AM:
Hello,
I'm currently trying to convert a slow and ugly script I made, so that
it's
faster and can be computed on a computer grid with the multicore
package.
My problem is that I don't see how to turn some loops into an
apply-able
function.
Shige Song wrote on 12/12/2011 07:49:39 PM:
Dear All,
I am fitting a simple GAM model using the gam function in the mgcv
package. The only independent variable is a continuous variable
representing the time of the event (in year and month) coded so that
0 represents January 1960, 1
On 12.12.2011 23:24, Barroso, Judit wrote:
Please,
I am receiving lot of e-mails that I do not want.
Please could you delete my e-mail.
I think most of us will delete it. If you want to unsubscribe, please
read the footer of any message, it tells you where you can unsubscribe
yourself.
On 13.12.2011 04:36, wim nursal wrote:
Dear Uwe and David,
Yes, definitely i was wrong. The expression in R should be:
glm(cbind(FD, 12 - FD) ~ Fsize, family=binomial, data=subFS)
Call: glm(formula = cbind(FD, 12 - FD) ~ Fsize, family = binomial,
data = subFS)
Coefficients:
Probably some division by zero is done somewhere internally. We cannot
say more since this is not reproducible for us.
Uwe LIgges
On 13.12.2011 18:29, niki wrote:
Dear all,
I have a datafile where I run haplo.GLM analyses using several variables (a
matrix). However, when I include a
Frederik Vanrenterghem wrote on 12/13/2011 01:55:03 PM:
Hi,
Being a novice to R, I would like to create a graph in R with 2 axes.
One of the 2 only has positive values, the other one also has negative
values. The part I'm struggling with is how to align the 2.
Rather than starting to
I'm doing a text mining project where I have to manually enter a double quote
as an element inside a vector.
I tried
char[10]=''#where i enclosed the double quote in a pair of single quotes.
But the result is [1] \. Somehow a back slash is added automatically.
I also tried to enclose the
Hi,
For my data, I followed the example of
http://en.wikibooks.org/wiki/Data_Mining_Algorithms_In_R/Clustering/K-Means#Execution
and got some very nice results. Despite the fact, that I want to achieve a bit
more by clustering my data (stratification beyond case-control), the actual
Hello!
I have such a problem...
Estimated a model based on common data (you can find it in R library), and I
wanted to plot the orginal values with the estimated one. Unfortunately I
can only see the original values.
Below is the code with data library:
/
library(forecast)
data(AirPassengers)
Hello,
I want to know if there is any way to avoid source() stopping when there
is an error.
Here is the content of my Main.R script:
source(~/R/source/Constructor1.R) # Object1 should be constructed
ifelse(exists(Object1),# It's an S4 object
print(Object1 exists), #
Wow...it's so simple! I have specified the variable times.
Thank you so much, Ben!
--
View this message in context:
http://r.789695.n4.nabble.com/optimize-tp4173920p4192278.html
Sent from the R help mailing list archive at Nabble.com.
__
Would wrapping the problematic part in try() solve your problem?
On Tue, Dec 13, 2011 at 3:24 PM, Ronan Maron rona...@gmail.com wrote:
Hello,
I want to know if there is any way to avoid source() stopping when there is
an error.
Here is the content of my Main.R script:
?try or ?tryCatch or ?withCallingHandlers
-- Bert
On Tue, Dec 13, 2011 at 12:24 PM, Ronan Maron rona...@gmail.com wrote:
Hello,
I want to know if there is any way to avoid source() stopping when there is
an error.
Here is the content of my Main.R script:
Try the pch() argument to plot(), or perhaps using text(), depending
on what exactly you're trying to achieve.
Sarah
On Tue, Dec 13, 2011 at 4:03 PM, Meesters, Christian meest...@aesku.com wrote:
Hi,
For my data, I followed the example of
Okay,
try(Object1 - constructorFunction(args)) # in Constructor1.R
works fine.
Thank you.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
\ is how its displayed on the screen. however, if you write your object
to a csv it will be correct. r cant display as it is so it is escaping
the second double quote for you
however, ' (double quote single quote double quote) does display
correctly as well as save correctly.
If that doesn't
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf Of bonnieyuan
Sent: Tuesday, December 13, 2011 2:04 PM
To: r-help@r-project.org
Subject: [R] how to manually enter an double quote as data feed?
I'm doing a text mining project
Also, you should probably be using if and else here rather than ifelse.
Michael
On Dec 13, 2011, at 5:43 PM, Ronan Maron rona...@gmail.com wrote:
Okay,
try(Object1 - constructorFunction(args)) # in Constructor1.R
works fine.
Thank you.
__
I saw an example online of taking hclust dendrogram and plotting it using
ggplot2 and thought I would give it a try to see what it would look like. I
get an error when trying to use ggplot; Error: ggplot2 doesn't know how to
deal with data of class phylo. Regular plot works fine but I can't get
Hi,
Are you sure? That's not what I got:
require(epicalc)
?logistic.display
model0 - glm(case ~ induced + spontaneous, family=binomial, data=infert)
logistic.display(model0)
Logistic regression predicting case
crude OR(95%CI) adj. OR(95%CI)P(Wald's test)
I forgot to mention (sorry for double posting) that str(infert) shows that
induced and spontaneous are not factors:
'data.frame': 248 obs. of 8 variables:
$ education : Factor w/ 3 levels 0-5yrs,6-11yrs,..: 1 1 1 1 2 2 2
2 2 2 ...
$ age : num 26 42 39 34 35 36 23 32 21 28 ...
$
Hi lm_mengxin,
If that's the case, just use as.factor():
fit - glm(case ~ as.factor(induced) + as.factor(spontaneous),
family=binomial, data=infert)
logistic.display(fit)
OR lower95ci upper95ci Pr(|Z|)
as.factor(induced)1 1.585398 0.7972313 3.152769
logistic.display need a rather tidy model ie all independent variables must
be the original name not any function of a variable in the dataset of the
model.
If data1 is your dataset containing y, 'gender' and 'age', what you need to
do is
data1$age1 - factor(data1$age)
result1-glm(y ~ age1 +
matys mts89 at o2.pl writes:
Hello!
I have such a problem...
Estimated a model based on common data (you can find it in R library), and I
wanted to plot the orginal values with the estimated one. Unfortunately I
can only see the original values.
Below is the code with data library:
/
Hi all,
I've been struggling with some code and was wondering if you all could help.
I am trying to generate a theoretical population of P people who are housed
within X different units. Each unit follows the same structure- 10 people per
unit, 8 of whom are junior and two of whom are senior.
BD == Berry, David d...@noc.ac.uk writes:
BD All variables are reals other than id which is varchar(10) and date
BD which is a timestamp, approximately 1.5 million rows are returned by
BD the query and it takes order 10 second to execute using psql (the
BD command line client for Postgres) and a
Hi sir:
I follow your suggestion:
result-glm(y ~ factor(age) + factor(gender) + CD4,family = binomial)
logistic.display(result)
Error in coeff[, 1] : incorrect number of dimensions
At 2011-12-14 01:59:36,Jorge I Velez jorgeivanve...@gmail.com wrote:
Hi there,
Try
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf Of Robin Cura
Sent: Tuesday December 13, 2011 3:16 AM
I'm currently trying to convert a slow and ugly script I made, so that
it's
faster and can be computed on a computer grid
Hello,
matys wrote
Hello!
I have such a problem...
Estimated a model based on common data (you can find it in R library), and
I wanted to plot the orginal values with the estimated one. Unfortunately
I can only see the original values.
Below is the code with data library:
/
According to the example of logistic.display:
model0 - glm(case ~ induced + spontaneous, family=binomial, data=infert)
summary(model0)
logistic.display(model0)
induced: 3levels 0,1,2
spontaneous: 3levels 0,1,2
So if 0 is reference, we should get 2 OR for induced1, induced2,
spontaneous1,
Hi
Please any one help in finding the predicted value for lmer function
model- lmer(formula =formula,data=data,verbose=TRUE,family = gaussian)
I need to get predicted value for this model.
I'm not able to get the formula
Please help
Thanks in advance
Arun
--
View this message in context:
Hello Hasan Diwan:
The codes you gave, download Yahoo quotes to Excel spreadsheet, works well
in my pc, too. Thank you
so much.
As a novice of R language, I did find that one sentence works in one
package usually is not available in
another package. To some reason, I am using
Yes,I¡¡understand.
Thanks for your help.
At 2011-12-14 13:53:21,Virasakdi Chongsuvivatwong cvira...@gmail.com wrote:
logistic.display need a rather tidy model ie all independent variables must be
the original name not any function of a variable in the dataset of the model.
If data1 is your
Yes,it works well.
Thanks for your help.
At 2011-12-14 13:06:14,Jorge I Velez jorgeivanve...@gmail.com wrote:
Hi lm_mengxin,
If that's the case, just use as.factor():
fit - glm(case ~ as.factor(induced) + as.factor(spontaneous),
family=binomial, data=infert)
logistic.display(fit)
Sir:
I find out that for 2 level factor, if I set it to factor, then I'll get
error reply.
For the instance last mail, if I use:
result1-glm(y ~ gender,family = binomial);#gender has 2 levels
logistic.display(result1)
Error in coeff[, 1] : incorrect number of dimensions
if I use:
lm_mengxin,
Yes, it happens because you are not following what Dr. Chongsuvivatwong
suggested you in a previous email. Compare
yourdata$age1 - factor(yourdata$gender)
result1-glm(y ~ gender + CD4,family = binomial, data=yourdata)
logistic.display(result1)
and
fit -glm(y ~
93 matches
Mail list logo