similar to: problem w/ lm() ?

Displaying 20 results from an estimated 5000 matches similar to: "problem w/ lm() ?"

2010 Feb 09
1
lm combined with splines
Hello, In the following I tried 3 versions of an example in R help. Only the two first predict command work. After : library(splines) require(stats) 1) fm1 <- lm(weight ~ bs(height, df = 5), data = women) ht1 <- seq(57, 73, len = 200) ph1 <- predict(fm1, data.frame(height=ht1)) # OK plot(women, xlab = "Height (in)", ylab = "Weight (lb)") lines(ht1, ph1) 2)
1999 Jan 12
1
glm families in R
Is the following difference between S+ and R normal or is it a bug? Thanks. FC. PS: S+ 4.5 for Windows and R 0.63.1 for Windows. S-PLUS output: > inverse.gaussian()$deriv > function(mu) > -2/mu^3 R output: > inverse.gaussian()$deriv > NULL -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read
1999 Jul 23
2
Getting R graphics into MS Word (more)
Further to my earlier question. Thank you to: John Maindonald, Ramon Diaz-Uriarte, Brian Ripley, Alvaro Novo, Simon Bond and David Scott for your helpful replies. I have looked at the problem in some more detail. I am using Rgui.exe Version 0.64.2 (July 3, 1999) running under Windows NT To demonstrate the problem, I run the program: > win.graph(width=5, height=3) > data(women) >
2014 Jan 03
2
Question about --files-from= and folder structure
I'm writing a script to sync some mp3 files. Due to a limitation in the number of destination files that can be read from my thumb drive, I'm not looking to preserve the original file structure (actually, I'm looking to sync *only the files* to the new destination directory). The source files are all subfolders under /backup/Music: ./Adrian Legg/Mrs. Crowe's Blue Waltz/Paddy
2006 Sep 05
1
Sweave and the "[" function
I am wanting to use the "[" operator in an S-chunk, e.g. <<>>= str(women) women$height women[,1] "["(women,1) @ to show the equivalence of three methods of extracting an element from a data.frame. However Sweave returns the last of these as women[1] in the S input chunk How can I force it not to do this and return "["(women,1)
2008 Mar 28
2
Comparing proportions between groups
Hello there, I have two groups (men and women) and I know per group how many of them smoke or don't smoke (women 40 of 200; men 100 of 300). I would like to know how I can compare in R if men and women differ significantly in their smoking. However, because there are more men in the sample than women I cannot just compare the number of smokers and non-smokers in both groups, right?! (I would
2010 Nov 01
1
sqldf error only on Unix not Windows
Hello Group, I am having trouble with the sqldf package on unix. The same code works fine on windows. Silly Example script: # Load the package library(sqldf) # Use the titanic data set data(women) colnames(women) head(women) sqldf('select height, count(*) from women where height is not null group by weight') Unix Output and error: bash-3.00$ R --vanilla <testR.R
2011 Jun 06
1
list demographics
Hi all, I got curious about something, so in proper scientific fashion I obtained some data and analyzed it. Question: what is the female participation in the R-help email list? Data: the most recent list postings, obtained from the website. I took my best shot at classifying the names given in the email header as male/female, but ended with a fair number of unknowns. This dataset had 2797
2008 Dec 24
1
Using SPSS Labels
I am trying to import a SPSS.sav file into R. The attached file is not technically the file I am trying to import, but does replicate my problem. The actual file is much too large to attach. No matter what I do, I can not get R (base or Hmisc) to apply the value labels in the .sav file to the dataframe created in R. Here's the code that I am using. maine <- spss.get("test.sav") #
2007 Apr 18
3
Problems in programming a simple likelihood
As part of carrying out a complicated maximum likelihood estimation, I am trying to learn to program likelihoods in R. I started with a simple probit model but am unable to get the code to work. Any help or suggestions are most welcome. I give my code below: ************************************ mlogl <- function(mu, y, X) { n <- nrow(X) zeta <- X%*%mu llik <- 0 for (i in 1:n) { if
2016 May 05
2
Resuming the discussion of establishing an LLVM code of conduct
Am 05.05.2016 um 23:19 schrieb Tanya Lattner: > Having a code of conduct like this is just as bad as having no code > of conduct at all. It trivializes the importance of a code of conduct > and its pretty much impossible to enforce. Regardless of what kind CoC you have: if it comes to having to enforce it, the community has stopped being open and welcoming. So I think this approach is
2002 Aug 17
1
Peculiar behavior of attached objects
I've just discovered R and think it is terrific. I quickly reproduced results with a few lines of R commands that 7 years ago I had to do with a larger fortran code and many calls to NAG routines. (I'm mostly a computational plasma physicist, but occasionally delve into statistical analysis of data.) But I've come accross a very peculiar behavior of attached objects that cost me
2007 Jul 05
1
Incidence estimated from Kaplan-Meier
Dear all, I have a stat question that may not be related to R, but I would like to have your advice. I have just read a medical paper in which the authors report the 1-p (where p is the cumulative survival probability from the Kaplan Meier curve) as incidence of disease. Specifically, the study followed ~12000 women on drug A and ~20000 women on drug B for 12 months. During that period
2008 Aug 23
3
graphs for pretest data
Is there an easy way to make graphs for the following data. I have pretest and posttest scores for men and women. I would like to form a 'titlted segment' plot for the data. That is, make segments joining the scores, with different types of segments for men and women. Example data: menpre <- c(43,42,26,39,60,60,46) menpost <- c(40,41,36,42,54,58,43) womenpre <-
2010 Jun 11
1
Documentation of B-spline function
Goodmorning, This is a documentation related question about the B-spline function in R. In the help file it is stated that: "df degrees of freedom; one can specify df rather than knots; bs() then chooses df-degree-1 knots at suitable quantiles of x (which will ignore missing values)." So if one were to specify a spline with 6 degrees of freedom (and no intercept) then a basis
2018 May 25
1
Urgent - R help - Multivariate - Naive Bayes code for R
Friends, I am doing a URL classification, based on certain key words whether it contains an executive information or not. I have already went through 50K URL's and identified the key words and made it as 0, 1 ( 0 - do not have the key word and 1 - have the key word) and 0- do not contain executive information 1 - contains executive information. A sample set of data is shown below. DomainID
2016 Mar 04
2
R 3.2.4 rc issue
I generally run 'make; make check' (with more settings) when building the Debian package. Running 3.2.4 rc from last night, I see a lot of package loading issues during 'make check'. Here is splines as one examples: checking package 'splines' * using log directory '/build/r-base-3.2.3.20160303/tests/splines.Rcheck' * using R version 3.2.4 RC (2016-03-02 r70270) *
2005 Apr 19
1
controlling the x axis of boxplots
v 2.0.1 (sooooh old!) on Win2k I think I know the answer to this but I can hope ... I have data for continuous variables (measures of residents) by a categorical variable in range (1,22), the units in which they live. I want to plot these data with a pair of boxplots one above another with same x-axis (1,22) using par(mfrow=c(2,1)) and then plotting first for the women then for the men.
2012 May 05
3
metafor
Dear users of metafor, I am working on a meta-analysis using the metafor package. I have a excel csv database that I am working with. I am interested in pooling the effect measures for a particular subgroup (European women) in this csv database. I am conducting both sub-group and meta-regression. In subgroup-analyses, I have stratified the database to create a separate csv file just for European
2007 Jun 28
2
sampling question
I am interested in locating a script to implement a sampling scheme that would basically make it more likely that a particular observation is chosen based on a weight associated with the observation. I am trying to select a sample of ~30 census blocks from each ZIP code area based on the proportion of women in a ZCTA living in a particular block. I want to make it more likely that a block will