How to find the conditional CDF based on observed data in R Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern)How to compare observed distribution to sampled distributions, using cumulative distibution function?Product of two independent random variablesHow to calculate simple CDF like Wolfram Alpha, but locally?What is the meaning of the conditional $y|b$How to find conditional distributions from jointHow to find copula-based conditional probability P(U|V>=v)?How to compute the CDF of this random variable?Confidence Intervals of non-normal data with known pdf/cdfEfficient estimation of conditional means from pdf, CDF, & quantile function supplied numericallyHow to relate beta CDF to student-t CDF?
Is grep documentation about ignoring case wrong, since it doesn't ignore case in filenames?
How often does castling occur in grandmaster games?
Performance gap between vector<bool> and array
How to get all distinct words within a set of lines?
Why are vacuum tubes still used in amateur radios?
I want to complete my figure
How were pictures turned from film to a big picture in a picture frame before digital scanning?
A term for a woman complaining about things/begging in a cute/childish way
What order were files/directories outputted in dir?
Why does it sometimes sound good to play a grace note as a lead in to a note in a melody?
Time to Settle Down!
Maximum summed subsequences with non-adjacent items
How much damage would a cupful of neutron star matter do to the Earth?
How can I reduce the gap between left and right of cdot with a macro?
Crossing US/Canada Border for less than 24 hours
What's the meaning of "fortified infraction restraint"?
Update module to run alter command
Disembodied hand growing fangs
How to compare two different files line by line in unix?
How does the secondary effect of the Heat Metal spell interact with a creature resistant/immune to fire damage?
Why is it faster to reheat something than it is to cook it?
Do wooden building fires get hotter than 600°C?
I am having problem understanding the behavior of below code in JavaScript
What initially awakened the Balrog?
How to find the conditional CDF based on observed data in R
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern)How to compare observed distribution to sampled distributions, using cumulative distibution function?Product of two independent random variablesHow to calculate simple CDF like Wolfram Alpha, but locally?What is the meaning of the conditional $y|b$How to find conditional distributions from jointHow to find copula-based conditional probability P(U|V>=v)?How to compute the CDF of this random variable?Confidence Intervals of non-normal data with known pdf/cdfEfficient estimation of conditional means from pdf, CDF, & quantile function supplied numericallyHow to relate beta CDF to student-t CDF?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
$begingroup$
If we have two samples (generally their distribution is not known),say $Xsim N(0,1)$, $Y|Xsim N(X,X^2/2)$. Can we recover the conditional CDF of $Y|X$ based on the observed samples in R?
n=1000
x=rnorm(n)
y=rnorm(n,x,x^2/2)
r distributions conditional-probability cdf
$endgroup$
add a comment |
$begingroup$
If we have two samples (generally their distribution is not known),say $Xsim N(0,1)$, $Y|Xsim N(X,X^2/2)$. Can we recover the conditional CDF of $Y|X$ based on the observed samples in R?
n=1000
x=rnorm(n)
y=rnorm(n,x,x^2/2)
r distributions conditional-probability cdf
$endgroup$
$begingroup$
conditional PDF and CDF can be estimated nonparametrically. There is supposedly at least one package available for those purposes.
$endgroup$
– Gary Moore
5 hours ago
$begingroup$
Thank you for your kind comment! Do you have the reference for the method of nonparametric estimation and the R package?
$endgroup$
– J.Mike
4 hours ago
add a comment |
$begingroup$
If we have two samples (generally their distribution is not known),say $Xsim N(0,1)$, $Y|Xsim N(X,X^2/2)$. Can we recover the conditional CDF of $Y|X$ based on the observed samples in R?
n=1000
x=rnorm(n)
y=rnorm(n,x,x^2/2)
r distributions conditional-probability cdf
$endgroup$
If we have two samples (generally their distribution is not known),say $Xsim N(0,1)$, $Y|Xsim N(X,X^2/2)$. Can we recover the conditional CDF of $Y|X$ based on the observed samples in R?
n=1000
x=rnorm(n)
y=rnorm(n,x,x^2/2)
r distributions conditional-probability cdf
r distributions conditional-probability cdf
asked 5 hours ago
J.MikeJ.Mike
1415
1415
$begingroup$
conditional PDF and CDF can be estimated nonparametrically. There is supposedly at least one package available for those purposes.
$endgroup$
– Gary Moore
5 hours ago
$begingroup$
Thank you for your kind comment! Do you have the reference for the method of nonparametric estimation and the R package?
$endgroup$
– J.Mike
4 hours ago
add a comment |
$begingroup$
conditional PDF and CDF can be estimated nonparametrically. There is supposedly at least one package available for those purposes.
$endgroup$
– Gary Moore
5 hours ago
$begingroup$
Thank you for your kind comment! Do you have the reference for the method of nonparametric estimation and the R package?
$endgroup$
– J.Mike
4 hours ago
$begingroup$
conditional PDF and CDF can be estimated nonparametrically. There is supposedly at least one package available for those purposes.
$endgroup$
– Gary Moore
5 hours ago
$begingroup$
conditional PDF and CDF can be estimated nonparametrically. There is supposedly at least one package available for those purposes.
$endgroup$
– Gary Moore
5 hours ago
$begingroup$
Thank you for your kind comment! Do you have the reference for the method of nonparametric estimation and the R package?
$endgroup$
– J.Mike
4 hours ago
$begingroup$
Thank you for your kind comment! Do you have the reference for the method of nonparametric estimation and the R package?
$endgroup$
– J.Mike
4 hours ago
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
You can't determine the CDF from samples, but you can easily get an empirical estimate:
set.seed(1359)
n <- 1000
x <- rnorm(n)
y <- rnorm(n, x, x^2/2)
LM <- lm(y ~ 0 + x) # no intercept because you know this, though usually you won't
coef(LM)
Gives me $hatbeta = 1.076$, or $haty = 1.076 cdot x + epsilon$ (about $1times x$, as you specified).
Similarly, you can get an empirical estimate of the standard deviation you supplied with sd(resid(LM))
.
If you don't know anything about their distributions, you could try a non-parametric approach.
$endgroup$
$begingroup$
Thank you for your answer! Do you have the reference for the nonparametric approach?
$endgroup$
– J.Mike
4 hours ago
add a comment |
$begingroup$
Finding the conditional distribution of a variable $Y$ conditional on another observed variable $X$ is the entire subject matter of regression analysis (construed in its wide sense to include linear and nonlinear regression models, GLMs, GLMMs, etc.). This is a huge subject and a core part of statistical education. If you would like to learn more about it, I would recommend starting with some material on linear regression analysis, and then building up from there.
$endgroup$
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "65"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstats.stackexchange.com%2fquestions%2f403907%2fhow-to-find-the-conditional-cdf-based-on-observed-data-in-r%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
You can't determine the CDF from samples, but you can easily get an empirical estimate:
set.seed(1359)
n <- 1000
x <- rnorm(n)
y <- rnorm(n, x, x^2/2)
LM <- lm(y ~ 0 + x) # no intercept because you know this, though usually you won't
coef(LM)
Gives me $hatbeta = 1.076$, or $haty = 1.076 cdot x + epsilon$ (about $1times x$, as you specified).
Similarly, you can get an empirical estimate of the standard deviation you supplied with sd(resid(LM))
.
If you don't know anything about their distributions, you could try a non-parametric approach.
$endgroup$
$begingroup$
Thank you for your answer! Do you have the reference for the nonparametric approach?
$endgroup$
– J.Mike
4 hours ago
add a comment |
$begingroup$
You can't determine the CDF from samples, but you can easily get an empirical estimate:
set.seed(1359)
n <- 1000
x <- rnorm(n)
y <- rnorm(n, x, x^2/2)
LM <- lm(y ~ 0 + x) # no intercept because you know this, though usually you won't
coef(LM)
Gives me $hatbeta = 1.076$, or $haty = 1.076 cdot x + epsilon$ (about $1times x$, as you specified).
Similarly, you can get an empirical estimate of the standard deviation you supplied with sd(resid(LM))
.
If you don't know anything about their distributions, you could try a non-parametric approach.
$endgroup$
$begingroup$
Thank you for your answer! Do you have the reference for the nonparametric approach?
$endgroup$
– J.Mike
4 hours ago
add a comment |
$begingroup$
You can't determine the CDF from samples, but you can easily get an empirical estimate:
set.seed(1359)
n <- 1000
x <- rnorm(n)
y <- rnorm(n, x, x^2/2)
LM <- lm(y ~ 0 + x) # no intercept because you know this, though usually you won't
coef(LM)
Gives me $hatbeta = 1.076$, or $haty = 1.076 cdot x + epsilon$ (about $1times x$, as you specified).
Similarly, you can get an empirical estimate of the standard deviation you supplied with sd(resid(LM))
.
If you don't know anything about their distributions, you could try a non-parametric approach.
$endgroup$
You can't determine the CDF from samples, but you can easily get an empirical estimate:
set.seed(1359)
n <- 1000
x <- rnorm(n)
y <- rnorm(n, x, x^2/2)
LM <- lm(y ~ 0 + x) # no intercept because you know this, though usually you won't
coef(LM)
Gives me $hatbeta = 1.076$, or $haty = 1.076 cdot x + epsilon$ (about $1times x$, as you specified).
Similarly, you can get an empirical estimate of the standard deviation you supplied with sd(resid(LM))
.
If you don't know anything about their distributions, you could try a non-parametric approach.
answered 5 hours ago
Frans RodenburgFrans Rodenburg
3,6471529
3,6471529
$begingroup$
Thank you for your answer! Do you have the reference for the nonparametric approach?
$endgroup$
– J.Mike
4 hours ago
add a comment |
$begingroup$
Thank you for your answer! Do you have the reference for the nonparametric approach?
$endgroup$
– J.Mike
4 hours ago
$begingroup$
Thank you for your answer! Do you have the reference for the nonparametric approach?
$endgroup$
– J.Mike
4 hours ago
$begingroup$
Thank you for your answer! Do you have the reference for the nonparametric approach?
$endgroup$
– J.Mike
4 hours ago
add a comment |
$begingroup$
Finding the conditional distribution of a variable $Y$ conditional on another observed variable $X$ is the entire subject matter of regression analysis (construed in its wide sense to include linear and nonlinear regression models, GLMs, GLMMs, etc.). This is a huge subject and a core part of statistical education. If you would like to learn more about it, I would recommend starting with some material on linear regression analysis, and then building up from there.
$endgroup$
add a comment |
$begingroup$
Finding the conditional distribution of a variable $Y$ conditional on another observed variable $X$ is the entire subject matter of regression analysis (construed in its wide sense to include linear and nonlinear regression models, GLMs, GLMMs, etc.). This is a huge subject and a core part of statistical education. If you would like to learn more about it, I would recommend starting with some material on linear regression analysis, and then building up from there.
$endgroup$
add a comment |
$begingroup$
Finding the conditional distribution of a variable $Y$ conditional on another observed variable $X$ is the entire subject matter of regression analysis (construed in its wide sense to include linear and nonlinear regression models, GLMs, GLMMs, etc.). This is a huge subject and a core part of statistical education. If you would like to learn more about it, I would recommend starting with some material on linear regression analysis, and then building up from there.
$endgroup$
Finding the conditional distribution of a variable $Y$ conditional on another observed variable $X$ is the entire subject matter of regression analysis (construed in its wide sense to include linear and nonlinear regression models, GLMs, GLMMs, etc.). This is a huge subject and a core part of statistical education. If you would like to learn more about it, I would recommend starting with some material on linear regression analysis, and then building up from there.
answered 9 mins ago
BenBen
28.8k233129
28.8k233129
add a comment |
add a comment |
Thanks for contributing an answer to Cross Validated!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstats.stackexchange.com%2fquestions%2f403907%2fhow-to-find-the-conditional-cdf-based-on-observed-data-in-r%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
$begingroup$
conditional PDF and CDF can be estimated nonparametrically. There is supposedly at least one package available for those purposes.
$endgroup$
– Gary Moore
5 hours ago
$begingroup$
Thank you for your kind comment! Do you have the reference for the method of nonparametric estimation and the R package?
$endgroup$
– J.Mike
4 hours ago