similar to: Factors attribute?

Displaying 20 results from an estimated 10000 matches similar to: "Factors attribute?"

2010 Mar 22
1
Factors attribute format
Thanks to Marc Schultz I found the documentation on the "factors" attribute under ?term.object. It stats: factors: A matrix of variables by terms showing which variables appear in which terms. The entries are 0 if the variable does not occur in the term, 1 if it does occur and should be coded by contrasts, and 2 if it occurs and should be coded via dummy
2010 Mar 06
1
Interpretation of 'swtich'
In browsing the source I see the following construct: res <- switch(type, working = , response = r, deviance = , pearson = if (is.null(object$weights)) r else r * sqrt(object$weights), partial = r) I understand that 'switch' will execute the code that is matched by its corresponding string value (in this case 'type'). What I don't
2002 Dec 01
1
generating contrast names
Dear R-devel list members, I'd like to suggest a more flexible procedure for generating contrast names. I apologise for a relatively long message -- I want my proposal to be clear. I've never liked the current approach. For example, the names generated by contr.treatment paste factor to level names with no separation between the two; contr.sum simply numbers contrasts (I recall an
2002 Nov 02
1
problem with expand.model.frame
Dear R list members, I'm encountering a problem with expand.model.frame(): Suppose that I define the following simple function (meant just to illustrate the problem): > fun <- function(model){ + expand.model.frame(model, all.vars(formula(model))) + } > and I have the following model, created with an explicit data argument: > mod Call:
2011 Nov 08
3
window?
Can someone enlighten me on why the following doesn't work? setwd('C:/Temp/R') d <- rep(1:53,2) (s <- ts(d, frequency=53, start=c(2000,10))) n <- length(s) k <- n%/%3 for(i in (n-k):n) { st <- c(start(s)[1] + (start(s)[2] + i)%/%frequency(s), (start(s)[2] + i) %% frequency(s)) ed <- c(start(s)[1] +
2017 Oct 15
2
Bootstrapped Regression
Hello Rui, Thanks for your helpful suggestions. Just for illustration, let's use the well known Duncan dataset of prestige vs education + income that is contained in the "car" package. Suppose I wish to use boot function to bootstrap a linear regression of prestige ~ education + income and use the following script: duncan.function <- function(data, indices) {data =
2017 Oct 15
0
Bootstrapped Regression
Hello, Much clearer now, thanks. It's a matter of changing the function boot calls to return the predicted values at the point of interess, education = 50, income = 75. I have changed the way the function uses the indices a bit, the result is the same, it's just the way I usually do it. pred.duncan.function <- function(data, indices) { mod <- lm(prestige ~ education +
2011 Nov 07
3
Upgrade R?
I am trying to upgrade to R 2.14 from R 2.13.1 I have compied all the libraries from the 'library' directory in my existing installation (2.13.1) to the installed R 2.14. Now I want to uninstall the old installation (R 2.13.1) and I get the error: Internal Error: Cannot find utCompiledCode record for this version of the uninstaller. Any ideas? Kevin [[alternative HTML
2008 May 12
2
ggplot2: font size mismatch for pdf output
Hi In the following, the graph I see on the screen and the .png output coincide. However, in the .pdf file, the fonts seem to be scaled fairly larger, resulting in the label for the top legend disappearing. Is this an infelicity or bug, or is there something I've missed? More generally, how do I control the size of fonts used in legends and axis labels? library(car) library(ggplot2) qp
2011 Oct 22
7
"Plotting" text?
I noticed that the text() command adds text to a plot. Is there a way to either make the plot blank or add text to a "blank sheet". I would like to "plot" a page that contains just text, no plot lines, labels, etc. Suggestions? Kevin [[alternative HTML version deleted]]
2012 Apr 12
2
scatter3d: problem with spheres-color
Dear List, I don't get scatter3d to color the sheres according to the '|' argument. library(car) scatter3d(prestige ~ income + education|type, data=Prestige) The spheres on my screen are all colored the same and they are not conditional on Prestige$type. On the other hand: Fit3d and Ellipse3d are colored according to the group argument. rgl_0.92.879 car_2.0-12 R version 2.15.0
2011 Feb 08
1
How to change labels in scatterplot?
Dear all, I'm trying to use "scatterplot" from package "car" to get a scatterplot with row-names as labels and I want my data to be divided into two groups defined by the column "tresh". Leaving away the groups-command gives me the right labels but they are not distinguished by colors according to "tresh". Does anybody know why the following example
2011 Nov 10
3
Title for a group of plots?
I can get multiple plots on a page like: op <- par(mfcol = c(3, 1)) What I was wondering is if there is a way to have a title for the whole page? I can specify the title for each individual plot like: plot(xxx, main=".") But I would like a 'title' for the group of plots. Is this possible? Thank you. Kevin [[alternative HTML version deleted]]
2011 Nov 26
3
Time series merge?
I have two time series a <- ts(1:10, start=c(1,6), end=c(2,5), frequency=10) b <- ts(1:5, start=c(2,1), end=c(2,5), frequency=10) Obviously 'b' is a subset of 'a'. I want a single index value indicating where that start of 'b' lines up with the start of 'a'. So in this simple example I would expect an index of 5. I was playing with 'merge'.
2011 Jan 14
1
Question about scatterplot in package car
I am getting an error message from scatterplot: > library(car) > scatterplot(Prestige$income~Prestige$type) Error in Summary.factor(c(2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, : range not meaningful for factors In addition: Warning message: In Ops.factor(x[floor(d)], x[ceiling(d)]) : + not meaningful for factors > The command does output the kind of graph that I want (boxplots).
2011 Nov 15
3
if/else scope
What is wrong with the following? x <- 1:2 if(x[1] > 0) { if(x[2] > 0) { print("1 & 2 > 0") } else { print("1 > 0") } } else { if(x[2] > 0) {
2009 Nov 08
2
linear trend line and a quadratic trend line.
Dear list users How is it possible to visualise both a linear trend line and a quadratic trend line on a plot of two variables? Here my almost working exsample. data(Duncan) attach(Duncan) plot(prestige ~ income) abline(lm(prestige ~ income), col=2, lwd=2) Now I would like to add yet another trend line, but this time a quadratic one. So I have two trend lines. One linear trend line
2006 Oct 14
2
regression analyses using a vector of means and a variance-covariance matrix
R 2.2.0 windows XP How can I perform a regression analyses using a vector of means, a variance-covariance matrix? I looked at the help screen for lm and did not see any option for using the afore mentioned structures as input to lm. Thanks, John John Sorkin M.D., Ph.D. Chief, Biostatistics and Informatics Baltimore VA Medical Center GRECC, University of Maryland School of Medicine Claude D.
2002 Mar 04
2
Standardized Beta?
Greetings all! Got another question for you: When doing regression, is there a way of automatically obtaining the standardized correlation coefficients? /Fredrik -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the
2009 Oct 27
3
Non-normal residuals.
Hello, I asked a question about what the most likely process to follow if after a time-series fit is performed the residuals are found to be non-normal. One peron responded and offered to help if I supplied a sample data set. Unfortunately now that I have a sample I have lost the emai addressl. If you are that person or have some ideas please email me back at rkevinburton at charter.net. Thank